Hi,
I am a beginner for CRM and Creatio. I got this code from academy.
I am stuck at UpdateQuery. Is there any other way to set column values from client side?
OwnerId is taken from a lookup of contacts
var OwnerId = this.openLookup(config, this.addCallBack, this);
var SelectedRows = this.get("SelectedRows");
if(SelectedRows.length > 0){
var batchQuery = this.Ext.create("Terrasoft.BatchQuery");
SelectedRows.forEach(function(selectedRowId){
var update = this.Ext.create("UpdateQuery",{
rootSchemaName : "Lead"
});
update.enablePrimaryColumnFilter(selectedRowId);
update.setParameterValue("Owner", OwnerId, this.Terrasoft.DataValueType.GUID);
batchQuery.add(update);
},this);
batchQuery.execute(function(){
this.reloadGridData();
},this);
}