One of my clients asked to emb an IFrame in a CRM Account Form with a URL containing a specific Query String value from one of the Account record fields. This is a pretty straight forward JavaScript.
The CRM JavaScript to leveage is: Xrm.Page.ui.controls.get(“IFRAME_[Insert Name]“).setSrc([Insert URL]);
However, the challenge with CRM 2013 or CRM Online is that CRM for Tablets doesn’t support IFrame at this time and therefore the above JavaScript will produce an error when opening an Account record on CRM for Tablets. Here is the link for details on what code can run in CRM for Tablets.
The approach would be to check for CRM for Tablets and if it is, don’t run the IFrame portion of the JavaScript code. Here is an example from Write and debug scripts for CRM for tablets:
var isCrmForTablets = (Xrm.Page.context.client.getClient() == “Mobile”);
if (isCrmForTablets)
{
// Code for CRM for Tablets only goes here
}
else
{
// Code for web browser or Outlook Client only goes here
}
// Code for any Client goes here
Contact me if you are looking for help with your CRM Online.
Frank Lee, Microsoft CRM MVP since 2006
Workopia, Inc. – Dynamics CRM Online Specialist, San Francisco

Like
Report
*This post is locked for comments