Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics 365 Mobile App not executing lock/unlock field business rules or setDisabled in javascript

(0) ShareShare
ReportReport
Posted on by

I have configured a business rule to show/hide fields depending on another field value. The business rule works fine in both browser and tablet.
I have other business rules to lock fields depending on another field value, that work fine in browser and not in tablet. The boolean fields and the option set fields are locked, other fields are not locked.
The scope of the business rules is set to "All forms" and I check that all the fields for the Business Rules are showing up in the CRM Tablet.

I try to lock these fields by javascript but it doesn't work on tablet
Code :

Xrm.Page.ui.controls.forEach(function (control, i) {
if (control && control.getDisabled && !control.getDisabled()) {
if(control.getName()=="control_name")
control.setDisabled(false);
}
});

Anyone experience the same issue or have any suggestions?
Thanks in advance for any help.

*This post is locked for comments

  • bwc Profile Picture
    bwc 5 on at
    RE: Dynamics 365 Mobile App not executing lock/unlock field business rules or setDisabled in javascript

    8.3 just came out for on-premise. Curious if this fixes the inability to lock fields in MoCa

  • Suggested answer
    PranavShroti Profile Picture
    PranavShroti 4,510 on at
    RE: Dynamics 365 Mobile App not executing lock/unlock field business rules or setDisabled in javascript

    Hi,

    Two ways of testing

    1) On the form customization page, click Preview, then Mobile Client. From here you can select if you want to view a preview for a Tablet or Phone.

    2) First, log in to CRM using the desired user credentials and in another tab enter the following:

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

    Replace “orgname” with your CRM organization name. You may get a warning that it cannot be accessed via a web browser, but after clicking “ok,” it should work.

    This should give you an idea whats going on with mobile forms.

    Regards,

    Pranav

    Mark answer as "verified" if it solves your issue.

  • RE: Dynamics 365 Mobile App not executing lock/unlock field business rules or setDisabled in javascript

    Hi We are using online .

  • RE: Dynamics 365 Mobile App not executing lock/unlock field business rules or setDisabled in javascript

    Hi ,

    The same to us, we are experiencing the same issue on tablet after installing roll up 8.2.2.0112.

    But I couldn't find a roll up version "8.2.2.146" for Dynamics 365 on premise where CLAB01 mentioned it fixed this issue.

    Any help?

  • RE: Dynamics 365 Mobile App not executing lock/unlock field business rules or setDisabled in javascript

    Hi,

    Are you using online / onprem? We are also experience the same issue on tablet after installing the latest roll up of 8.2.2. 

  • RE: Dynamics 365 Mobile App not executing lock/unlock field business rules or setDisabled in javascript

    Hi all ,

    Our issue was resolved because we upgraded our organization .

    The issue  has been fixed in version 8.2.2.146.

    If your organization is in this version or above , the issue should be fixed.

  • RE: Dynamics 365 Mobile App not executing lock/unlock field business rules or setDisabled in javascript

    We got the same issue and for us it became critical as users may change fields in the app which are not allowed to be changed at all, as they are coming from our ERP system.

    Is there any update for this issue? Any case number we may be able to escalate?

    Best regards

    Danny

  • RE: Dynamics 365 Mobile App not executing lock/unlock field business rules or setDisabled in javascript

    Can you give us the ticket number?

    Thanks

  • RE: Dynamics 365 Mobile App not executing lock/unlock field business rules or setDisabled in javascript

    Hi ,

    Disabling/Enabling   Fields  using  javascript or Business Rules is not working in Mobile (tablet and phone) . this is a known Bug by Microsoft now .

    I have already raised a ticket with Ms support about this. They still don't know when they are going to release a fix for this .

    If you like you can contact MS support to highlight this .

    Hope it helps

  • RE: Dynamics 365 Mobile App not executing lock/unlock field business rules or setDisabled in javascript

    In Mobile/Tablet this code works with boolean fields and optionset fields only.

    It works fine in browser.

    Have you any suggestions?

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,430 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans