In a previous post i showed how to display originating leads notes in an iframe after converting. In Microsoft CRM 2011 that code no longer works. Here is the updated code.
function originatingLeadNotes()
{
var Parent = Xrm.Page.data.entity.attributes.get(“originatingleadid”);
var IFrame = Xrm.Page.ui.controls.get(“IFRAME_originatingLeadNotes”);
if (Parent.getValue() != null) {
var GUIDvalue = Parent.getValue()[0].id;
IFrame.setSrc(“/_controls/notes/notesdata.aspx?id=”+ GUIDvalue + ” &ParentEntity=3&EnableInlineEdit=false&EnableInsert=false”);
}
else
{
IFrame.setSrc(“about:blank”);
}
}
Enjoy!
-JC
For more information about Dynamics Four or to contact us please visit http://www.dynamics4.com
