Hi Community,
I want to retrieve fields from the parent form once a quick create form is opened. I have onLoad script on QC form in which i need to retrieve the underlying parent forms field. What are the possible supported ways of doing it?
I tried using window.parent or DOM element, but still i couldn't access the parent forms elements.
Thanks in advance
Hi,
The out of box relationship won't work in your scenario because you are hitting new from a lookup ( and not from a subgrid). Unfortunately in this scenario, I don't think there is any supported way. I will see if I can try this using DOM (window.parent). If yes, will share the details here :)
For now, you can explore the Goutam's suggestion on the below thread and see if this wok for you.
Hope this helps.
Thanks Ravi for quick turnback and apologize for incomplete details.
We have 1:N out of box relationship between contact & opportunity entity right. On opportunity form, we have account & contact lookup fields. Say user filled in account lookup field on opportunity and saved it. Now user clicks contact lookup field and he doesn't find it so clicks on "New Record" button on the contact lookup which opens up contact quick create form. Ideally, the account lookup field on opportunity should map to account field on contact quick create form but it isn't working.
I tried in brand new vanilla instance, but it is mapping fields as per relationship mapping when you create an opportunity from contact. But when creating contact from opportunity its not mapping it.
FYI, i also tried using unsupported DOM elements like window.parent/window.top.parent.frames[0], but unfortunately i am not getting any of the parent attributes on UCI. Not sure how to achieve this though?
Hi,
There is no supported way to get the fields from the parent record, however if you have some relationship exists then you may be able to use the relationship mapping to populate the fields from parent to child. For example, out of box when you create a contact from an account, the business phone, address details and account name is auto populated from the account record.
If you do not have a parent child relationship then you can go for the unsupported methods of using window/dom object as you mentioned. If these are not working then provide more details (with screenshot) what are you trying to populate, what have you tried and what is not working (including any error or debug info).
Hope this helps.
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,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156