Validation of Tasklets action RRS feed

  • Question

  • Hai all,

    We are developing a mobile application with dynamics mobile framework 2.0 and visula studio 2005, windows mobile 5.0 emuator

    I navigate from one screen to other screen in the  emulator with the help of soft keys that have been defined in the UserRole.Xml file.

    I have two Menu actions(two softkeys) in a screen for which i need to validate data based on the menu item selected.

    The problem here is how can i determine which softkey(which tasklet action is selected) is selected in the method below which i have written in the Tasklet1.cs page 
    Public Override ValidationResult Vaildate()

    PLease kindly do the needful help

    Wednesday, September 2, 2009 6:32 AM


All replies

  • Hi,

    You could probably create an enumeration that lists all the different actions that could be performed by any of the soft keys and then create a variable of this type, then set this variable to the appropriate enumeration value when the soft key is pressed. Then check this variable in the Validate method.

    Hope this helps.

    Paul Diston
    • Proposed as answer by Mohsin S Wednesday, September 2, 2009 10:57 AM
    Wednesday, September 2, 2009 6:49 AM
  • Hi Paul,

    Paul if the Soft key is a control element, i can handle the click event. But i cannot handle  the click event as it  is dynamically loaded from the UserRole.xml file.  In the UserRole.xml file the
    <open text="New" tasklet="InvoiceTasklet" name="NewInivoice" Validate="true"/>
    <open text="Return" tasklet="ReturnTasklet" name="ReturnInivoice" Validate="true"/>

    as the Validate property of the softkeys is made true, i can only override the validate method that i have shown above. I need to ceck here which action key is pressed  that's all...

    How can i extract the information of the Action Element(that has been clicked) defined  in the UserRole.xml file
    How can i do this??

     Please kindly do the needful help
    Wednesday, September 2, 2009 8:56 AM
  • Dear Paul,

    I am new to this mobile Development. 
    Could You please give me a code snippet.

    With Regards,
    RaviChandra P

    Wednesday, September 2, 2009 11:37 AM
  • Hi Satheen,            


    Since you are developing towards Microsoft Dynamics Mobile, a better place to post your question would be:




    Zhe Zhao

    • Marked as answer by ZHE ZHAO Tuesday, September 8, 2009 7:06 AM
    Monday, September 7, 2009 8:06 AM