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

Workflow activity timing issues

CJB
Tera Expert

Hi, team! I have been struggling with a workflow activity not grabbing the most recent comments from sys_journal_field.

 

In a UI action, on the client side, I'm setting a value in the comment field. In the server side of this UI action, it triggers a workflow activity. This workflow activity does a GlideRecord query on the sys_journal_field table to pull in the most recent comment. However, the comment that I added with the UI action does not get pulled in. Instead, the workflow activity pulls in a comment previous to the one that posts with the UI action. It's almost like the workflow activity gets triggered before the UI action even finishes updating the record.

 

Any ideas on how to resolve this? Thanks.

6 REPLIES 6

Hi, @Sheldon  Swift. I tried accessing the rej_rat variable on the Run Script side, but it's not valid. I'm getting this in my system logs: "rej_rat" is not defined."

That is expected, as rej_rat is defined in your Reject UI Action, but not available in your Run Script Workflow Activity. My suggestion was to move that putIssue call into your UI action.