Wednesday, January 14, 2015

Dynamics CRM 2013 - Show custom page inside an iframe CRM 2013

1. Create a iframe inside the CRM form.

























2. Create a web resources (JS)


function putiframe()
{
var id= Xrm.Page.data.entity.getId();
var getform = Xrm.Page.ui.getFormType();


var host = window.location.protocol + '//' + window.location.hostname + 'port number' + '/SA/RichTextBox.aspx?id=' + id+ '&getform=' + getform ;
if ( getform != 1)
{
Xrm.Page.getControl("iframename").setSrc(host);

}
}

3, Save and Publish  and set onload event to call the javascript.

No comments:

Post a Comment