The CreatorCon Call for Content is officially open! Get started here.

concept on g_scratchpad

Rajkumar Bommal
Tera Contributor

Hi 
How would i Show Alert message on creating an incident record it should display the caller's location. By using g_scratchpad in BusinessRule and client script..

1 ACCEPTED SOLUTION

@Rajkumar Bommal - ah apologies, it was the caller's location not the current user.šŸ˜…

 

If so, you can update the BR to 

(function executeRule(current, previous /*null when async*/ ) {

    var userGr = new GlideRecord("sys_user"); 
    userGr.get(current.getValue('caller_id'));
    g_scratchpad.currentLocation = userGr.getDisplayValue('location');

})(current, previous);

View solution in original post

18 REPLIES 18

Rajkumar Bommal
Tera Contributor

@Rajkumar Bommal 

Are you impersonating as Abel Tuter? I tried it on my PDI and once again, it's working fine

JamesChun_0-1711621491177.png

 

Can you also share a screenshot of the BR as well? (including its table, when to run)

Rajkumar Bommal
Tera Contributor

Rajkumar Bommal
Tera Contributor

@James Chun 
No Am not impersonating as Abel Tuter.
am Working with my sys administrator

Yea, that might be it then. It prompts the current user's location. Does the system admin account has a location populated? If not, update it and try it again