web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Pass Parameters to IFRAME

(0) ShareShare
ReportReport
Posted on by

Hi all -

I have an IFRAME on the Opportunity form. The frame shows a custom ASP.NET web form. I need to pass the name of the Opportunity record to one of the text boxes on the web form.

Is this possible?

Thanks.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Gopalan Bhuvanesh Profile Picture
    11,401 on at

    Hi

    Please, refer the following thread:

    community.dynamics.com/.../140657

    community.dynamics.com/.../209503

  • Suggested answer
    ashlega Profile Picture
    34,477 on at

    Hi Rich,

     would this work? You can do it in the onload of the opportunity form:

     community.dynamics.com/.../209503

     Or you can use "Pass record object-type code and unique identifier as parameters" checkbox when setting up an iframe, but, then, you'll have to go back to CRM from your ASP.NET web form and read the name of that opportunity (since you'll only have the ID):

    social.microsoft.com/.../what-is-pass-record-object-as-unique-identifier-as-parameters-for-iframe-in-crm-4-

  • Verified answer
    Community Member Profile Picture
    on at

    Hi Rich,

    This is one solution:

    In your ASP.NET Web Form, add a JavaScript function that executes on load.

    Inside that function have the following code:

    var opporunityName = parent.Xrm.Page.getAttribute("your_attribute_name").getValue();

    Then you can use the above variable according to your business requirements.

    Hope this helps,

    Charmis

  • C. Jensen Profile Picture
    384 on at

    Hi Rich

    I don't think tou can pass the name directly, as a parameter. But you could use the "Pass record object-type code and uniqeu identifier as parameters" options on the IFRAME. Then on your custom web form, you could query crm for the relevant informations.

    msdn.microsoft.com/.../gg328034.aspx

  • Community Member Profile Picture
    on at

    Thank you for the direction. In the end I solved this by added this to my aspx.cs Page_Load:

    protected void Page_Load(object sender, EventArgs e)

       {

           string name = Request["name"];

           txtBoxName.Text = name;

       }

    I then used an onLoad JS function in CRM on the opportunity entity to update the IFRAME URL to include ?name="record name":

    function change()

    {

    var name = Xrm.Page.getAttribute("name").getValue();

    Xrm.Page.ui.controls.get("IFRAME_test").setSrc("http://localhost:64616/Pages/main.aspx?name" + name);

    }

    Thanks all who replied.

  • Community Member Profile Picture
    on at

    Hi!

    1) You need to get a Opportunity name on a Opportunity form by scripts. It's easy to make. This is a standart fuction and standart field on the form.

    2) Substitute application url into Iframe also with script and pass the get parameter there.

    3) The application takes this get parameter with url ans fills the field during the loading or another necessary event.

    Dynamica Labs http://dynamicalabs.com/

    Disclaimer:

    Any post on this page provided "as is" without warranty of any kind and is for educational and information purposes only. We disclaim any liability arising from any reliance placed on any post.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans