Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

Hide a field based on Related Entity field value

Posted on by 42

Hello All,

Parent entity : Account

Child Entity : Contact

Field Parent on Contact entity visible if Account field Client = 1 otherwise hide Parent field.

Any clue how to do this via J Script? Looked into getting the Account Client field values but now I am stuck how to go further.

  • Verified answer
    Vikas Gangi Profile Picture
    Vikas Gangi 30 on at
    RE: Hide a field based on Related Entity field value

    Like Andrew mentioned below. you can achieve this by doing API call to Parent entity(Account) and getting the desired value(Client Filed value). Based on the client field Value from Account entity you can either Hide/Show parent field on Child.

    You have to trigger this code on load for this to function as you are hiding parent field which I assume is Account entity lookup.

    please feel free to reach out if it did not answer you request.

  • Verified answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Hide a field based on Related Entity field value

    Hello,

    In order to perform that customization, you will have to use Xrm.WebApi to retrieve the account record based on the lookup.

    Basically, you will have to combine the following articles:

    arunpotti.com/.../

    docs.microsoft.com/.../retrieverecord

    carldesouza.com/.../

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

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,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans