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

Announcements

News and Announcements icon
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,264 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans