locked
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

    Regards
    Satheen
    Wednesday, September 2, 2009 6:32 AM

Answers

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
    http://www.smartmobiledevice.co.uk/
    • 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
    <actions>
    <open text="New" tasklet="InvoiceTasklet" name="NewInivoice" Validate="true"/>
    <open text="Return" tasklet="ReturnTasklet" name="ReturnInivoice" Validate="true"/>
    </actions>

    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:

    http://social.microsoft.com/Forums/en-US/category/dynamics 

     

    Thanks,

    Zhe Zhao

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