Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Script error on Dynamics 365 App for mobile

Posted on by

Hi, i get the below error while opening opportunity page on Dynamics 365 App. 

2161.Error-1.PNG      1513.Error-2.jpg

It works fine when i access it through web on my PC and also through a browser on mobile. It just throws the error if try to access through the App.

*This post is locked for comments

  • Suggested answer
    Preeti Sharma Profile Picture
    Preeti Sharma 2,678 on at
    RE: Script error on Dynamics 365 App for mobile

    Hi,

    Please make sure the fields yoylu are using in your script are present on mobile form.

    CRM has a limitation of 75 fields to be displayed on mobile form.Also only 10 tabs and 5 sections can be displayed on form.

    Any field beyond these limitations cause error when on mobile forms.

    Following links can help you:

    community.dynamics.com/.../181752

    Hope this helps:)

  • Feminho Diniz Profile Picture
    Feminho Diniz 65 on at
    RE: Script error on Dynamics 365 App for mobile

    Have you find the answer?

  • MdNazar Profile Picture
    MdNazar on at
    RE: Script error on Dynamics 365 App for mobile

    Its just staying on the page where it says Please stay on this screen while we get things ready for you

  • Suggested answer
    PranavShroti Profile Picture
    PranavShroti 4,510 on at
    RE: Script error on Dynamics 365 App for mobile

    Hi Nazar,

    1. Try to open the crm in a browser, below URL provides a preview of your application in mobile. However do keep in mind that this may only mimic on windows environment. Behavior may be slightly different in apple and andriod. (not very sure of this).

        orgname.crm.dynamics.com/.../main.htm;server=orgname.crm.dynamics.com

    2. Check your fields/sections etc are enabled for mobile.

    3. just as a sanity check, ensure your custom JS is supported in all browser versions.

    Regards,

    Pranav

  • VermaNitin Profile Picture
    VermaNitin 455 on at
    RE: Script error on Dynamics 365 App for mobile

    Hi Nazar,

    Please use above given link to open your CRM instance in a browser on a desktop and then you can debug the issue.

    Many thanks,

    Nitin  Verma

  • MdNazar Profile Picture
    MdNazar on at
    RE: Script error on Dynamics 365 App for mobile

    It is working fine when opened inside a browser in a mobile. The error occur only on the Dynamics 365 App.

  • Suggested answer
    VermaNitin Profile Picture
    VermaNitin 455 on at
    RE: Script error on Dynamics 365 App for mobile

    Hi Nazar,

    There is a smart way to figure out the issue associated with this error.

    Open the mobile version of the form in a browser using the below url.

    https://orgname.crm.dynamics.com/nga/main.htm?org=orgname&server=https://orgname.crm.dynamics.com

    Change the orgname with your organization uri.

     

    Once you open the form, start the debugger mode of the browser and check the console for the error.

    Hope it helps!

    Many thanks,

    Nitin Verma

  • MdNazar Profile Picture
    MdNazar on at
    RE: Script error on Dynamics 365 App for mobile

    function hideSubgridsOnLoad() {

     //Hide SubGrid OnLoad: Crew Nationality - But not on mobile

     if (Xrm.Page.context.client.getClient() != "Mobile")

     {

      Xrm.Page.ui.controls.get('crewnationalitygrid').setVisible(false);

     }

    }

    function showHideSubgrids() {

     var MarketLabel;

     var ConceptProductLabel;

     //Get Value of Market

     var Market = Xrm.Page.data.entity.attributes.get('ap_market');

     if (Market.getValue() != null) {

         MarketLabel = Market.getValue()[0].name;

     }

     //Get Value of Concept/Product

     var ConceptProduct = Xrm.Page.data.entity.attributes.get('ap_conceptproduct');

     if (ConceptProduct.getValue() != null) {

         ConceptProductLabel = ConceptProduct.getValue()[0].name;

     }

     //If Concept/Product equals Saatsea then show Crew Nationality Sub-Grid - But not on mobile

     if (ConceptProductLabel == "Saatsea") {

       //Show Sections:

       if (Xrm.Page.context.client.getClient() != "Mobile")

       {

         Xrm.Page.ui.controls.get('crewnationalitygrid').setVisible(true);

       }

       Xrm.Page.ui.tabs.get("tab_products").setVisible(false);

     }

     //If Market equals Newbuiding then show Tab: Newbuilding Information

     else if (MarketLabel == "Newbuilding" && ConceptProductLabel == "Liferaft" || ConceptProductLabel == "Full Package for NB" || ConceptProductLabel == "Davit/Lifeboat") {

       Xrm.Page.ui.tabs.get("tab_newbuildinginformation").setVisible(true);

     }

     //If Market equals Newbuiding AND Concept/Product equals MES Passenger OR MES Offshore then show Tab: Products

     else if (MarketLabel == "Newbuilding" && ConceptProductLabel == "MES Passenger" || ConceptProductLabel == "MES Offshore") {

       //Show Products

       Xrm.Page.ui.tabs.get("tab_newbuildinginformation").setVisible(true);

       Xrm.Page.ui.tabs.get("tab_products").setVisible(true);

     }

     //If Market equals Replacement AND Concept/Product equals MES Passenger OR MES Offshore OR PPE Fire then show Tab: Products

     else if (MarketLabel == "Replacement" && ConceptProductLabel == "MES Passenger" || ConceptProductLabel == "MES Offshore" || ConceptProductLabel == "PPE Fire") {

       //Show Products

       Xrm.Page.ui.tabs.get("tab_products").setVisible(true);

     }

     //Otherwise just hide Sub-Grid: Crew Nationality and Tab: Products + Newbuilding Information

     else {

       if (Xrm.Page.context.client.getClient() != "Mobile")

       {

        Xrm.Page.ui.controls.get('crewnationalitygrid').setVisible(false);

       }

       Xrm.Page.ui.tabs.get("tab_newbuildinginformation").setVisible(false);

       Xrm.Page.ui.tabs.get("tab_products").setVisible(false);

     }

    }

    This is the javascript i am using

  • tw0sh3ds Profile Picture
    tw0sh3ds 5,600 on at
    RE: Script error on Dynamics 365 App for mobile

    Looks like an error from a custom script that you have on your form. You should post the "Onload" script here, maybe we will be able to help then.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans