jump to navigation

Microsoft Dynamics CRM 2011 Show Originating Lead Notes After Converting May 1, 2011

Posted by jarrettexpertcrm in Microsoft CRM General.
Tags: , , , , , , , , ,
trackback


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

Comments»

1. Surya N - December 20, 2011

Hi Jarrett,
Thanks for the code, i tried this & i am struck some where. The Iframe says “Navigation was cancelled” in one & the other doesn’t display anything. Kindly help.

Thanks,
Surya N

jarrettexpertcrm - December 20, 2011

Hi Surya,

Can you reply back with your code and ill take a look.

Regards,

Jarrett

Surya N - December 21, 2011

Hi Jarrett,
Please find the code below,
function casenotes()
{
var Parent = Xrm.Page.data.entity.attributes.get(“new_case_investigationid”);
var IFrame = Xrm.Page.ui.controls.get(“IFRAME_case_attachments”);

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”);
}

}

Surya N - December 21, 2011

Hi jarrett,
by mistake i added the jscript to the iframe’s event, i have added it to the main form’s onload event now. I get an “object expected” error now.

jarrettexpertcrm - December 28, 2011

Where are you getting “amp” from in below?
IFrame.setSrc(“/_controls/notes/notesdata.aspx?id=”+ GUIDvalue + ” &ParentEntity=3&EnableInlineEdit=false&EnableInsert=false”);


Leave a reply to jarrettexpertcrm Cancel reply