UI action log

s_45
Tera Contributor

How to add log statements in UI action to see if it is running. Is the syntax below is correct? gs.log() in my script. 

gs.log("Inside the log");

I created a UI action and I want to test if it is triggering or not? 

14 REPLIES 14

s_45
Tera Contributor

I checked into Log Entries with Source is Script and it appears approve "list choice UI action" didn't generate logs.

Can someone please look into syntax if it is correct?

 

CONDITION

current.state == 'submitted' && (gs.hasRole('timecard_approver') || gs.hasRole('timecard_admin'))

 

SCRIPT

current.state="approved";
current.update();
gs.log("Inside the log","UI_ACTION_NAME");

Your script seems fine.  Can you try adding the gs.log to be the first line of the script and see if you get anything when someone click on the UI action.

Try with:

current.state = 'Approved';

I have time card/time sheet on my instances too and when looking at those values...they are the same as the label...meaning Approved, Pending etc. and not approved, pending.

Please verify your state choices.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Also...there's already a UI Action for approving these...that you may want to look in to, but if you're unable to locate it...here's a screenshot of mine (mine is inactive, because we don't want users using list approval like that)...

 

find_real_file.png


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi,

Let me know if you need any further assistance.

If my reply above solved your question, please that reply as "Correct".

Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!