Ajax (1) Apex Class (12) Apex Trigger (2) Community (2) Home Page (1) HTML (4) Integration (3) JS (7) KB (1) Label (1) Licenses (1) Listing (1) Log (1) OOPs (5) Sharing (1) Static Resource (1) Test Class (3) URI (1) Visualforce (10)

Tuesday 22 July 2014

populate multipicklist

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[i] + "&";
}


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