i have that function to update an account records (from a widgets created with sigma)
function handleCopyButtonCRMClick() {
console.log('handleCopyButtonCRMClick');
/*
* Fetch Information of Record passed in PageLoad
* and insert the response into the dom
*/
console.log('data.Entity : ' + sharedVariableEntityId);
ZOHO.CRM.API.getRecord({Entity:"Accounts",RecordID:sharedVariableEntityId})
.then(function(response)
{
console.log('response : ' + JSON.stringify(response));
var config={
Entity:"Accounts",
APIData:{
"id": sharedVariableEntityId,
"testzoho4__CF": "Zylker test 888899999"
},
Trigger:[]
}
ZOHO.CRM.API.updateRecord(config)
.then(function(data){
console.log(data)
})
//show the record information for debugging
if (sharedVariableDebug) {
document.getElementById("recordInfo").innerHTML = JSON.stringify(response, null, 2);
}
});
}