Notifications
Announcements
No record found.
Hi,
I have the account entity and phone call subgrid. Now on the Phone call sub grid button click I want to get the parent and Child entity name dynamically.
I not sure which CRM parameters to pass to get this both names. Please suggest
Thanks.
pass PrimaryEntityTypeName & SelectedEntityTypeName
If found helpful, Please mark my answer verified.
Hi partner,
We could not get the parent entity directly, but we could get the relationship and then get the parent entity by its relationship.
You could use gridContext.getRelationship to get relationship.
Here's the sample code.
//get current parent entity name in subgrid. function getParent(executionContext){ var formContext=executionContext.getFormContext(); var gridContext = formContext.getControl("Contacts"); // get the grid context gridContext.addOnLoad(onLoadSubgrid); } function onLoadSubgrid(executionContext){ var formContext=executionContext.getFormContext(); var gridContext = formContext.getControl("Contacts"); var entityName=gridContext.getEntityName(); var relationship=gridContext.getRelationship(); }
And if your child entity means the entity in the subgrid, you could use gridContext.getEntityName.
Best Regards,
Leo
Hi James,
Thanks for your recognition :)
Regards,
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
iampranjal 41
Martin Dráb 38 Most Valuable Professional
Satyam Prakash 35