Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Pass Dynamic Custom Parameters to Embedded Web Resource or IFRAME

Posted on by 145

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

  • Verified answer
    Alagunellaikumar Profile Picture
    Alagunellaikumar 6,210 on at
    RE: Pass Dynamic Custom Parameters to Embedded Web Resource or IFRAME

    Why dont you try to use fetch xml to retrieve accountdetail based on accountid(parent.Xrm.Page.data.entity.getId()) inside the webresource

  • ngetz Profile Picture
    ngetz 145 on at
    RE: Pass Dynamic Custom Parameters to Embedded Web Resource or IFRAME

    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!

  • Suggested answer
    Alagunellaikumar Profile Picture
    Alagunellaikumar 6,210 on at
    RE: Pass Dynamic Custom Parameters to Embedded Web Resource or IFRAME

    HI,

    From the web resource you are able to access the form related field.

    Parent.Xrm.Page.getAttributes('accountnumber').getValue();

  • ngetz Profile Picture
    ngetz 145 on at
    RE: Pass Dynamic Custom Parameters to Embedded Web Resource or IFRAME

    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?

  • spavithracse Profile Picture
    spavithracse 145 on at
    RE: Pass Dynamic Custom Parameters to Embedded Web Resource or IFRAME

    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?

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.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans