I have written a snippet which is as follows:
var element = arguments[0],
$ = skuid.$;
var leadmodel = skuid.model.getModel(“Lead”);
var raw= leadmodel.getFirstRow();
var MatterType=raw.Matter_Type__c; // Field on skuid page
var wlgoffice=raw.WLG_Office__c; // Field on skuid page
var result = sforce.connection.query(“SELECT
Name,Attorney__c,Matter_Type__c,Wlg_Office__c,Attornies__c,Id FROM
Consulting_Attorney__c where Matter_Type__c ='”+MatterType+“‘AND Wlg_Office__c
=’”+wlgoffice+“'”); // Query on salesforce object
var opp= result.getArray(“records”);
var string = opp[0].Attornies__c;
var array = string.split(‘,’); // Create an array of string
//Till Here snippet working fine
var rowstoupdate ={};
for(var a=0;a<array.length;a++){
raw.Attorney__c = array[a];
}
leadmodel.updateRows(raw);
Now i want to assign values of array to Attorney picklist(Attorney__c) .
How i can achieve this?
Please help as this is urgent.
Thanks in advance