web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Enable/Disable field in Resco field service mobile application

(0) ShareShare
ReportReport
Posted on by 6,211

Hi all,

I want enable/disable field using javascript in resco field service moible application.

i have tried below code but not working

MobileCRM.UI.EntityForm.requestObject(
                    function (entityForm) {
                        var detailView = entityForm.getDetailView("Summary");
                        var item = detailView.getItemByName("parentcontactid");
                        item.validate = false;
                    },
                    MobileCRM.bridge.alert,
                    null
                );

Regards,
Shahbaaz

*This post is locked for comments

I have the same question (0)
  • Shayan Soheili Profile Picture
    940 on at

    Hi Shabaz,

    You may can do that OOB, can you you explain what is your requirement?

    Rgeards,

    Shayan

  • Shahbaaz Ansari Profile Picture
    6,211 on at

    i can do it with OOB, but my requirement is like,

    on change of field (Contact) i want to auto populate field (Firstname) and i want to make that field(Firstname) disable, and also that field(firstname) is requied.

    when on change i auto populate that field(firstname) and with OOB functionlity it is readonly and when i hit save button it still give popup saying "First name is required" because it is readonly first and then it is populating value.

    now when i disable the rule that disable the field, it works fine. so my requirement is like i want to first fill the value in the field and then make it readonly.

  • Verified answer
    Shayan Soheili Profile Picture
    940 on at

    Hi Shahbaz,

    I understood, I could reproduce the issue. 

    Try to add a condition before making disable the field. Here i set a condition which say if the "name" field contains data then make it disable. In this way you can resolve the problem.

    0020.6.PNG

    Regards,

    Shayan

  • Shahbaaz Ansari Profile Picture
    6,211 on at

    that was awesome solution!!!

  • Shahbaaz Ansari Profile Picture
    6,211 on at

    hi shayan,

    if you could answer this also community.dynamics.com/.../295449 it would be helpful

  • Shahbaaz Ansari Profile Picture
    6,211 on at

    Hi Shayan,

    It is just showing me the primary contact in the filter contact lookup, but i want all the related record to that account, not just the primary contact.

    Thanks,

    Shahbaaz

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans