Adding iFrame to Contact to display Webpage

This question is answered

I’d like to insert an IFRAME on the Contact form to display a web page which should have the value of a Contact field at the end – i.e. URL…someid=[local field]. I tried to use a question mark after the “=” and add the field into the Dependencies list but that didn’t work. Would I have to go by create a web resource (Jscript) to achieve that?

Verified Answer
  • You can use HTML web resource, add web resource on contact form and by using

    Window.parent.Xrm.Page.getAttribute('attrname').getValue() you  can get attribute values of contact form on your custom web page.

    Thanks,

    Vijay Waghmare

  • Window.parent.Xrm.Page.getAttribute('attrname').getValue() code need to be added to your HTML web resource, using window.onload event you can read required attributes values available on entity form when web resource load.

    Place the HTML web resouce on entity form and have window.onload event to read values.

    Thanks,

    Vijay Waghmare

All Replies
  • You can use HTML web resource, add web resource on contact form and by using

    Window.parent.Xrm.Page.getAttribute('attrname').getValue() you  can get attribute values of contact form on your custom web page.

    Thanks,

    Vijay Waghmare

  • Hi VGOW,

    here is an JScript example from MSDN how to dynamically change an iframe URL.

    Regards,
    Ben

  • Thanks for Vijay, apologies for my ignorance but where do use Window.parent.Xrm.Page.getAttribute('attrname').getValue() ? Do I add it to the Web Resources Properties box? I'm new to CRM and not technical, would I need to pass this to a developer to create a custom Jscript?

  • Window.parent.Xrm.Page.getAttribute('attrname').getValue() code need to be added to your HTML web resource, using window.onload event you can read required attributes values available on entity form when web resource load.

    Place the HTML web resouce on entity form and have window.onload event to read values.

    Thanks,

    Vijay Waghmare