Why g_scratchpad code not working for me please check ?

1dusjhyahnt
Tera Contributor
Business Rule
 
(function executeRule(current, previous /*null when async*/) {

 

// Add your code here

 

g_scratchpad.cLocation=current.caller_id.department.getDisplayValues();
 

 

})(current, previous);
 
On Load Client Script Code:- 
 
function onLoad() {
//Type appropriate comment here, and begin script below
var department=g_scratchpad.cLocation;
alert("The Caller's Department " + department);
}
 
Please help me where is the mistake ??? 
It' shows like The Caller's Department Undefined ?? why 
4 REPLIES 4

Maik Skoddow
Tera Patron
Tera Patron

Hi @1dusjhyahnt 

you have a typo in your BR

can you please try (without the s at the end):

g_scratchpad.cLocation=current.caller_id.department.getDisplayValue();

Maik

Hi @Maik Skoddow  

 try without s also but still not working 

 

Hi

at least on the server side it is working for sure:

 

MaikSkoddow_0-1702915710451.png

 

Maik

Yes even in my case it is working in server side but while in client side it was showing as undefined