Deal Owner can not be updated
All,
My goal is to have a function that Automatically updates all deals with Deal Owner being Account Owner:
I have written the following custom function:
It runs, the deal timeline shows Updated Some fields. But Deal Owner does not change.
ANY IDEA / HELP ?
| void MapDeals2Acct (int AccountID ) |
respAccount = zoho.crm.getRecordById(("Accounts") ,input.AccountID ) ;
respDeals = zoho.crm.getRelatedRecords("Potentials" ,("Accounts") ,(input.AccountID).toString() ,1 ,200 ) ;
for each respDeal in respDeals
{
respPotentialID = respDeal.get("POTENTIALID") ;
updateMap.put("Potential Owner",(respAccount).get(("Account Owner")));
updateMap.put(respDeal.get("SMOWNERID"),(respAccount).get("SMOWNERID"));
updateRESULT = zoho.crm.updaterecord("Potentials",respPotentialID,updateMap) ;
}
Info updateRESULT;