function getLookupDetails(executionContext)
{
// Getting Form Context
var formContext = executionContext.getFormContext();
// Getting the value of customer id
var customerId = formContext.getAttribute(“customerid”).getValue();
// Getting the GUID of the lookup record
var Id = customerId[0].id;
// Getting Name of the lookup record
var Name = customerId[0].name;
// Getting Entity Name of the lookup which entity, the lookup record is belonging to.
var EntityType = customerId[0].entityType;
if(EntityType == "account")
formContext.getControl("fieldname").setVisible(true);
else
formContext.getControl("fieldname").setVisible(false);
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156