Friday, May 11, 2012

MSCRM 2011: Copying Notes from a Lead to Account, Contact and Opportunity when a Lead is Qualified

Some fields will automatically map from a Lead to an Account/Contact/Opportunity when a Lead is qualified and converted as described in the above post. Sometimes the notes in the Lead are helpful and it would be convenient if you could view them on a converted account/contact. In order to do this, you would need to go to the Originating Lead field in the Account/Contact and then drill down to the Lead to actually view the notes. They do not automatically move over to the Account, Contact or Opportunity when converting the Lead. The following is a work around that allows for the information to be mapped to one or all of these entities.

*Create Jscript type of web resource (as described in the above post) and paste the following Script:

function CopyLeadNotes(context){

var lookupItem = new Array;

lookupItem = Xrm.Page.getAttribute('originatingleadid').getValue();

var IFRAME_LeadNotes=Xrm.Page.getControl('IFRAME_LeadNotes');

var src='';

 if (lookupItem != null)
{               
  src="/"+context.getContext().getOrgUniqueName()+"/_controls/notes/notesdata.aspx?id="+lookupItem[0].id+"&ParentEntity=3&EnableInlineEdit=false&EnableInsert=false";
}
else
{
  src="about:blank";
}

 IFRAME_LeadNotes.setSrc(src);

}

* Save this web resource and publish it.
* Create an Iframe on Account form with the name “IFRAME_LeadNotes”
* Do not select the Restrict cross frame scripting checkbox.

*After creating the IFrame, call the function created above from the script on the onLoad event of  an Account. Make sure that you have selected “Pass execution context as first parameter”.

Now when qualifying a Lead to an Account, all of the notes on the Lead will be shown on the Account.

5 comments:

shruti singh said...

Hello,

I tried the above code on the contact entity.


function CopyAttachment(context)
{
var lookupItem = new Array;
lookupItem = Xrm.Page.getAttribute('originatingleadid').getValue();
var IFRAME_LeadNotes=Xrm.Page.getControl('IFRAME_LeadNotes');
var src='';

if (lookupItem != null)
{
src="/"+context.getContext().getOrgUniqueName()+"/_controls/notes/notesdata.aspx?id="+lookupItem[0].id +"&ParentEntity=3&EnableInlineEdit=false&EnableInsert=false";
}
else
{
src="about:blank";
}
IFRAME_LeadNotes.setSrc(src);
}

also renamed IFRAME as "IFRAME_LeadNotes".

However when I qualifieds the lead to contact it gave me following error:

Error: Unable to get the valur property 'setSrc'": object is null of undefined.

Can you please assist me on this issue.

Anonymous said...

Cushioning is definitely an essential function within the style from the face masks. The actual froth cushioning within the mind equipment is actually comfy towards the encounter. The actual froth doesn't have edges that might provide the sensation to be anxious. fake chanel design is merely not really regarding completely designed locks, because gentle, moving as well as mild is essential. Depart hair searching organic, as well as if you opt to place hair upward, depart a few gentle tendrils free. Braids are actually well-liked because tend to be improvements within the locks for example feathers or even fake watches as well as wispy items framework the face area. Make-up is actually organic as well as comfortable shades for example peach as well as bronze cheeks coordinated along with naked colours with regard to mouth as well as taupe round the eye tend to be fashionable selections for developing a last appear. Eye brows as well as chanel outlet needs to be organic as well as nicely groomed. Divided through atmosphere. The environment isolating both contacts is essential since it helps prevent fogging through happening. Furthermore, the actual contacts tend to be installed from correct position associated with 120 levels. This can be a great style as you. Nevertheless it is essential in order to weave your own pictures correctly on the most recent reproduction totes. It'll destroy the entire type of the actual fake prada bag when the pictures aren't shown correctly onto it. To say the truth, a number of clients possess small info associated with how you can location an image on the Tag Heuer 1500 Watches

林磊 said...

2016-2-20 leilei
jordan retro 8
christian louboutin uk
air jordan 4
burberry outlet
ralph lauren outlet
air max
louis vuitton
tiffany and co
ugg outlet
oakley sunglasses
jordan retro 4
coach outlet online
ray ban sunglasses
oakley sunglasses
nike store uk
coach factory outlet online
michael kors handbags
coach factory outlet online
nike huarache
toms outlet
canada goose jackets
ugg boots
louis vuitton borse
burberry outlet
air jordan 8
chaussure louboutin
canada goose jackets
nike outlet
nike trainers
longchamp le pliage
louboutin outlet
montblanc pens
toms shoes
christian louboutin
ray bans
burberry scarf
michael kors bags
nike sb dunks
cheap jordans
pandora charms

Karen said...



Our Bengals House Flag hangs vertically and provides a top sleeve for insertion of your flagpole. The Bengals House Flag measures 28x42 inches, is constructed of 2-ply polyester, and both sides are dye sublimated with the NFL team logo as shown.The house flag for Bengals has a liner sewn between its two polyester sides, therefore, this flag is viewable and readable correctly on both sides.Hang your Bengals House Flag with our banner pole or fly it with our 5' wood flagpole and adjustable flag bracket.nfl house flags
nfl flags wholesalecheap St.Louis Rams house divided flags
Falcons house divided flags, House Divided Flags,Sports Flags 3x5, Sports flags and banners,nfl House Divided Flags

Anne Lin said...

Sulla base di aspetto tipico del Galatasaray, metà rosso e giallo a metà, il kit Galatasaray 16-17 aggiunge un modello strisce mai vista prima per la parte anteriore e posteriore. Circa ispira le maniche della mascherina kit Vapor Nike, le strisce offrono una completamente nuova assumere il tradizionale disegno della camicia Galatasaray.maglie calcio poco prezzo,
maglie da calcio a poco prezzo, nuove Maglia Atletico Madrid prezzo
Maglia Barcelona prezzo