g_scratchpad is showing undefined value in different table

PavanAkola
Tera Contributor

In my case I'm using two different tables . does g_scratchpad work for two different tables ?

 

case:

In incident table there is a field that reference problem table i.e. of name "problem_id" by using display BR and scratchpad i need to move that specific incident number to the respective problem table and set that to a newly created field named "u_incident_ref". 

In system logs it was logging data perfectly but while trying to fetch from problem table client script it was showing as undefined

please refer below screenshots for better understanding!

1 ACCEPTED SOLUTION

smukherjee
Mega Sage

Any Business Rule is defined per table, and I am not 100% sure but g_scratchpad data is likely not shared between tables.

Also, a typical g_scratchpad use case is to pass data between server and client side of the same table, and not between tables.

 

You will likely need to:

1. Write a business rule (probably async) for the Incident table, that does a GlideRecord query of the problem with problem_id as the sys_id,

2. Update the u_incident_ref of the Problem record that came up as result of the query, with the sys_id of the current incident.

View solution in original post

6 REPLIES 6

Thank you @smukherjee . now I'm getting value in incident_ref field

Glad to know it worked!