Hello,
I have a requirement to work on the fields of the parent form on child entity form. The requirement is while working on the child entity form I have to access the values of some field which are available on the parent entity form using JavaScript.
Shoudl I use the window.parent.Xrm.Page.getAttribute() or it is deprecated now. Is there any other alternative way to access the field of the parent form. Please suggest me some solution.
Thanks
Hi AR,
Yes, you could use the retrieveRecord() function to get the parent record by parent record id. However, pay attention to this scenario:
Open a parent main form and modify some fields(Not Save) and then create child record by using quick create form.
In this scenario, the fields you modified on the parent main form are not saved. When you use retrieveRecord() function to get the parent record, it would get the original data. So if you want to get the modified value of field, you would better use window.parent.Xrm.Page.getAttribute() to get them. Although window.parent.Xrm.Page.getAttribute() is not supported.
Hi,
You need to use CRM.webapi
docs.microsoft.com/.../retrieverecord
I hope you have lookup field on child entity pointing to parent Entity record.
Thanks,
Bipin
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,219 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156