locked
CRM 2013 Mobile Application code Validations RRS feed

  • Question

  • Hi all,

           We are using CRM 2013 with Adfs. We are using in Mobile app also, But in CRM web we are having some validations but it is not working in CRM Mobile applications.

    (Eg) Owner Filed='JERRY' and RM Field ='JERRY'  Means i will show alert as Owner and RM Filed cannot be same. Its working fine in WEB not in Mobile app please guide...

    Link will be like this : https://crmuat.contosso.com:444/M/default.aspx

    Wednesday, February 12, 2014 1:02 PM

Answers

  • Look in the CRM 2013 SDK - with a few exceptions JavaScript code that works on the regular form should also work on the tablet application.

    Things like reading fields values 

    Xrm.Page.getAttribute("field").getValue()

    and setting values

    Xrm.Page.getAttribute("field").setValue(value)

    do not change syntax between clients


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    • Marked as answer by JERRY_TP Friday, February 14, 2014 5:45 AM
    Wednesday, February 12, 2014 2:17 PM
    Moderator

All replies

  • Mobile meaning the Phone or Tablet application?

    It sounds like you might be using JavaScript to display an alert if some condition is met. 

    JavaScript doesn't work in the Phone application.

    On the tablet application, display your alert message using:

    Xrm.Utility.alertDialog(message);
    


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    Wednesday, February 12, 2014 1:52 PM
    Moderator
  • Hi Jlattimer,

    Thanks for your Info.

    I Understand from your chat that Javascript wont work in Mobile application. And can you please share some codes to Work in CRM tablets.

    (Eg) Xrm.Utility.alertDialog(Message) working fine for alert.

    I need to Get value and Set value, Read a Text box and need to Compare dates is it Possible in Tablet if so please share the code

    Thanks in Advance

    Wednesday, February 12, 2014 2:05 PM
  • Look in the CRM 2013 SDK - with a few exceptions JavaScript code that works on the regular form should also work on the tablet application.

    Things like reading fields values 

    Xrm.Page.getAttribute("field").getValue()

    and setting values

    Xrm.Page.getAttribute("field").setValue(value)

    do not change syntax between clients


    Jason Lattimer
    My Blog -  Follow me on Twitter -  LinkedIn

    • Marked as answer by JERRY_TP Friday, February 14, 2014 5:45 AM
    Wednesday, February 12, 2014 2:17 PM
    Moderator
  • Hi JLattimer,

            Thanks and the Code working fine.. Can you please share the Code to stop Save event for Tablet.

    Is it same as

    function form_onsave(executionObj)

    {

    alert('h');

    executionObj.getEventArgs().preventDefault();
    return false;

    }

    if not please share the Code

    Friday, February 14, 2014 5:45 AM