Tuesday, July 22, 2014

correct code

var mplVals = '{! CH_Pre_Lead__c.Sub_Group__c }';
var mplValss2 = '{!CH_Pre_Lead__c.CH_Products__c }';
var mplSFID='00NO00000018kl3';
var mplSFID2='00NO00000018klS';
var mplVals1=new Array();
var mplVals2=new Array();
    mplVals1=mplVals.split(";");
    mplVals2=mplValss2.split(";");
var  params ='';
var  params2 ='';
var i;
var j;
for (i=0;i<mplVals1.length;i++)
{
params = params + mplSFID + '='+ mplVals1[i] + "&";
}
for (j=0;j<mplVals2.length;j++)
{
params2 = params2 + mplSFID2 + '='+ mplVals2[j] + "&";

}


var URL="/00Q/e?lea9={!CH_Pre_Lead__c.CH_Mobile__c}&lea11={!CH_Pre_Lead__c.CH_E_mail__c}&name_lastlea2={!CH_Pre_Lead__c.Pre_Lead_Last_Name__c}&lea3={!CH_Pre_Lead__c.CH_Company__c}&lea13={!CH_Pre_Lead__c.Lead_Status__c}&00NO00000018aoT={!CH_Pre_Lead__c.CH_Type_of_Requirement_1__c}&00NO00000018dMD={!CH_Pre_Lead__c.BU_Name__c}&name_firstlea2={!CH_Pre_Lead__c.Name}&recordtypeid=012O00000000SXkIAM&lea20={!CH_Pre_Lead__c.CH_Campaign__c}&00NO00000018dMD={!CH_Pre_Lead__c.BU_Name__c}&"+ params+'&'+params2;
parent.frames.location.replace(URL);

No comments:

Post a Comment

Thanks for your comment