I have a requirement to pass information from a related entity into an IFrame or web resource.
I have read the link below:
https://msdn.microsoft.com/en-us/library/gg327945.aspx
But it explains how to do it with static parameters; I need to do it with dynamic values. How do I change the source of the web resource and then read the data in the target page? Is the web resource the best solution here or an IFrame?
Thanks,
Nathan
*This post is locked for comments
Why dont you try to use fetch xml to retrieve accountdetail based on accountid(parent.Xrm.Page.data.entity.getId()) inside the webresource
Thanks, Alagu nellaikumar.S, the only problem is that the fields I need to retrieve are not on the parent form. So for example, the parent form might be Account, but the related entity is AccountDetails or something like that. I need to retrieve from that AccountDetails, which is why I am using FetchXML in the parent form. Thank you!
HI,
From the web resource you are able to access the form related field.
Parent.Xrm.Page.getAttributes('accountnumber').getValue();
Thanks Pavithra, but I need to pass from a related entity. The requirement is to get fields from a related entity and pass to the iFrame (or web resource, I don't think it matters). So I was constructing a FetchXML in the parent form and wanting to pass the results to the web resource. These are dynamic values. So how do I compose the query string. Do I use the Xrm.UtilityOpenWebResource for this? And if I do, will it pass parameters to the embedded web resource, or try to open a new window?
You can use Web Resource for passing parameters.
Do you want to pass dynamic value from same form field value or other entity form field value?
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