Unable to pass the scratchpad values in onLoad client script

Sujatha V M
Kilo Patron
Kilo Patron

Hi Team, 

 

I would like to cascade the incident number to change request 'parent' field using onLoad client script. 

 

I have fetched the incident number using display BR and able to get the logs, but when trying to set the scratchpad value in onLoad client script its "blank". 


Sujatha8_0-1679422341445.png

 

I'm trying to pass the number field value to parent (reference) field on the change request form. 

 

Sujatha8_1-1679422275909.png

 

If I pass a sys id directly, it works but not the one from scratchpad. 

 

Please help!

 

 

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.
1 ACCEPTED SOLUTION

Brad Bowman
Kilo Patron
Kilo Patron

The display BR triggers when the incident record is loaded, so you would need an onLoad client script on the same incident table to use the scratchpad value from the BR.  To get the incident number to a new change request record, you would have to look at the action which generates a new change record.  If you're using a UI Action, then the code to grab the incident number before going to the new change record needs to be in there...

View solution in original post

5 REPLIES 5

Thanks @Prince Arora for your response and your timely help!

 

I was able to achieve on the UI action by modifying the workspace client script query parameter as per @Brad Bowman  suggestions. 

 

 

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.