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)

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

I have the same question (0)
  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

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

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    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
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi,

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

  • Integration Profile Picture
    651 on at

    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
    gdas Profile Picture
    50,091 Moderator on at

    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

    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
    Sreevalli Profile Picture
    3,256 on at

    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.

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