Accelerator Help

From Sage CRM Knowledge Base

'Accelerator Online Help'



This is the code used to update an opportunity record created in Accelerator to have the company territory as the default. This should go into an UpdateRecord stub in a table level script.

 var oppo_primarycompanyid=Values("oppo_primarycompanyid");
 if ((oppo_primarycompanyid!="")&& (oppo_primarycompanyid+""!="undefined"))
 {
  var crec=CRM.FindRecord("company","comp_companyid="+oppo_primarycompanyid);
  Values("oppo_secterr")=crec("comp_secterr");
 }