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 :
Customer experience | Sales, Customer Insights,...
Unanswered

Show/Hide web resource on a form based on one of the field values of a related look-up record

(0) ShareShare
ReportReport
Posted on by 19

I am currently showing/hiding a web resource on my Customer (account) form based on whether a checkbox has been checked indicating that the Customer requires COVID-19 vaccination to work on their jobs.  This is working fine using Javascript on the Customer form's onload event:

function showCOVID19VaccineRequirementReminder(executionContext) {
 var formContext = executionContext.getFormContext();
 var COVID19VaccineRequirementYesOrNo = formContext.getAttribute("new_covid19vaccinerequirement").getValue();
        if (COVID19VaccineRequirementYesOrNo === true) {
            Xrm.Page.ui.setFormNotification("Verify the COVID-19 vaccination status of relevant team members assigned to perform any work for this client.","WARNING");
            Xrm.Page.getControl("WebResource_COVID19VaccineRequirementAlertReminder").setVisible(true);
        }
        else {
            Xrm.Page.getControl("WebResource_COVID19VaccineRequirementAlertReminder").setVisible(false);
        } 
}

Now, I want the same web resource to show/hide on the form for Proposal records based on whether the selected Customer look-up record has that checkbox checked.  Is there a way to get the checkbox field value from the related look-up Customer record, either using Javascript or a calculated field on the Proposal record?  I tried creating a calculated field, but for some reason the Customer field is not showing in the list of fields available when setting the calculated field's Action.

I have the same question (0)

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 83 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

#3
#ManoVerse Profile Picture

#ManoVerse 40

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans