How to access RITM/TASK variable values in Client Side script of UI Actions ?

ankita1506
Tera Contributor

Hi Everyone, 

 

I want to check the ritm variable values in the client code of UI Action custom button created on catalog task form. I tried accessing variable values using "current.variables.variable_name==" and even through "current.request_item.variables.variable_name" but neither of these are working. Please suggest a way in which I can check if the variables are empty or not in the client function for UI Action. 

1 ACCEPTED SOLUTION

Hello @ankita1506 ,

You can use the script include and call that script include through the Glide Ajax in the client side UI action. That will help.

 

Please mark my answer as accepted solution and give thumbs up, if it helps you.

View solution in original post

5 REPLIES 5

Abhishek_Thakur
Mega Sage

Hello @ankita1506 ,

You need to create this UI action on "sc_req_item" table, then only you would be able to access the variables with the help of "current.variable.variable_name".

 

Please mark my answer as accepted solution and give thumbs up, if it helps you.

But I want to create the custom button only on Catalog Task created for the RITM. And that button should only function after checking all the mandatory variables are populated , else abort the ongoing action. 

 

Is there any way to access variables in client function of UI action? The variables are visible on Task form also.

Hello @ankita1506 ,

You can use the script include and call that script include through the Glide Ajax in the client side UI action. That will help.

 

Please mark my answer as accepted solution and give thumbs up, if it helps you.

It worked this way but I have one more doubt. If I want to redirect to the same page after the action is performed how can I achieve this in client script. "action.setredirecturl(current)" is not working.