Quantcast
Viewing all articles
Browse latest Browse all 9

View originating lead notes on a contact

Our sales guys wanted a way to view originating lead notes against the Contacts created from Leads. I added a new tab to the contact containing an Iframe and used the below javascript to display the notes from the originating lead.

var lookupItem = new Array;
//set the lookup to the originating lead
lookupItem = crmForm.originatingleadid.DataValue;

if (lookupItem != null)
{
//display the originating lead notes in the iframe 'IFRAME_LeadNotes'
crmForm.all.IFRAME_LeadNotes.src="/_controls/notes/notesdata.aspx?id="+  lookupItem[0].id +  "&ParentEntity=3&EnableInlineEdit=false&EnableInsert=false";
}
else
{
//if there is no originating lead, hide the tab
crmForm.all.IFRAME_LeadNotes.src="about:blank";
tab7Tab.style.display = "none";
}


Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 9

Trending Articles