Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

What is the best way to show a read only "Field1"(eg:Yes/N0) as Yes flag on CRM form only if "Field2"(Eg:Date Field) gets updated through code.

(0) ShareShare
ReportReport
Posted on by 651

Hi,

What is the best way to show a read only "Field1"(eg:Yes/N0) as Yes flag  on CRM form only if "Field2"(Eg:Date Field) gets updated through code.

Also "Field2" is open for edit manually as well,on the Form.

*This post is locked for comments

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at
    RE: What is the best way to show a read only "Field1"(eg:Yes/N0) as Yes flag on CRM form only if "Field2"(Eg:Date Field) gets updated through code.

    Hi Krish,

    Whatever the source of field update of date field, we can only shoe/hide fields on the forms. so on form load Business rule will trigger and hide the respective field even your scope on your particular form. But if you have more that one form you can go ahed and use All Form just to avoid multiple rules on same functionality.

    Note, we have to refresh the form after data update if you are already on the form and Both the fields should be on the form.

  • Integration Profile Picture
    651 on at
    RE: What is the best way to show a read only "Field1"(eg:Yes/N0) as Yes flag on CRM form only if "Field2"(Eg:Date Field) gets updated through code.

    Hi,

    Our scenario is "Field2" can get updated from many sources like manually, through other referred entity etc.

    Now we are going to right a dedicated console application which updates the "Field2" on demand. So if this field gets modified through this code we need set Field1 as Flag to Ture.

    Else it should be "NO" which means it got modified by other means,

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: What is the best way to show a read only "Field1"(eg:Yes/N0) as Yes flag on CRM form only if "Field2"(Eg:Date Field) gets updated through code.

    Hi ,

    You can go with Business Rules , set scope entity as suggested above in that case your rules will work server side no matter how the field 2 get modified. Using business rules scope "Entity" you can avoid workflow or writing plugin as well , this is one of the new features in D365.

    Make sure when you update field 2 via plugin you can not see immediately in the forms , for that you need to refresh the  page.

  • Integration Profile Picture
    651 on at
    RE: What is the best way to show a read only "Field1"(eg:Yes/N0) as Yes flag on CRM form only if "Field2"(Eg:Date Field) gets updated through code.

    Hi,

    If in case Field 2 gets modified by any other means.Eg: by users manually and by Plug in etc.I need to set the "Field1" back to No as well.As per business need requested,

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,626 on at
    RE: What is the best way to show a read only "Field1"(eg:Yes/N0) as Yes flag on CRM form only if "Field2"(Eg:Date Field) gets updated through code.

    Hi,

    Since you are updating the date field through code, whey dont you set the "Field1" to yes within the same code together?

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: What is the best way to show a read only "Field1"(eg:Yes/N0) as Yes flag on CRM form only if "Field2"(Eg:Date Field) gets updated through code.

    Hi Krish,

    The best way is off-course using business rules as this is no code approach and always trigger before your custom JS code register in onchange event.

  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at
    RE: What is the best way to show a read only "Field1"(eg:Yes/N0) as Yes flag on CRM form only if "Field2"(Eg:Date Field) gets updated through code.

    Create a business rule and set the scope to "Entity" it will trigger server side.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans