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);
}
André Arnaud de Cal...
292,884
Super User 2025 Season 1
Martin Dráb
231,760
Most Valuable Professional
nmaenpaa
101,156
Moderator