Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

get a field value

Posted on by 130

i created a two field health and flag color on case entity.

if i give any value to health field  by that value check  condition show a different color flag and  flag color field show color name for that i create a html web resource but now i want to do that case is related to account now wnat to show that flag on that related account and flg color also using web resource . how can i do this??

  • Suggested answer
    Owen Scott Profile Picture
    Owen Scott on at
    RE: get a field value

    Hi ... just want to help out here a little by first making an attempt at translating your question. If you can, please confirm that this attempt is accurate , or perhaps close ...

    • You created two fields on the Case entity:  "Health" and "Flag Color"  (so values like "Poor Health" and "Red" - maybe these are option sets)
    • You created a web resource that you deployed on the Case form wherein if someone chooses a value for the Health field like "Poor Health," your web resource (JavaScript?) automatically changes the Flag Color to "Red" or some corresponding value.
    • You did that, but now you want to perform that same logic using similar fields on the Account record that is related to the Case.  Such that if an Account, at any given time, has a Case with "Poor Health" and flagged "Red" the Account is now flagged "Red" and considered to be in "Poor Health."

    Is that it? 

    If so, then suggestion 1 is to use a Global Option Set for your two fields - Health and Flag Color -- and then extend your web resource logic (JavaScript) to refer to the Account that is populating the lookup field to Account on the Case entity.  You could start more or less with this to get you toward that concept.   

    Something to consider, as others have mentioned in other threads, because there is a 1:N relationship between Account and Case, every time a Case for a given Account is updated in this fashion, the Account will also be updated.  So that means that the Account status (Health and Flag Color) will always be the "current" status as determined by the last Case record.  If you are OK with that design - perhaps that is your intention - then great. 

    If I helped you out, please mark it as the answer - thanks and best of luck with your Dynamics 365 deployment!  

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans