How to access previous value of "state" field in workflow
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2021 01:54 AM
Hi All,
I have a workflow running on HR payroll table . I want to set the "state" field to its previous value . How can I write in workflow . Below code i am using now, its seems not working
current.state = workflow.scratchpad.state;
current.update();
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2021 03:08 AM
Hi Roshani,
Use a run script in workflow and save the state value before it changes in a scratchpad, using:
workflow.scratchpad.state = current.state;
Now you can access this value anywhere in the workflow using 'workflow.scratchpad.state'.
Thanks