- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2019 09:06 AM
Hello,
I have a choice variable on a table called Remote Access Account (u_nhl_remote_access) with choice options:
- Pending (pending)
- Complete (complete)
- Request Again (request_again)
The default value is pending. When the value is changed to request_again, I want the value to stay as request_again for 24 hours then automatically be set back to pending.
I have tried using this business rule: (using 30 seconds instead of 24 hours for testing)
But this is not working. When I select request_again, it will say "Running transaction" for 30 seconds then update. I want the field to save and then I an keep doing other things, come back in 30 seconds and it be updated to pending.
Any help would be greatly appreciated! Thank you!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2019 09:18 AM
Hello Hannah,
I would suggest using a workflow for this. You could use a Timer in the workflow to wait 24hours and a WaitFor Condition to check that its all good still. Then add the script after that to update your field back to pending.
Let me know if you need help with this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2019 09:12 AM
You could use a workflow to do this which would wait for 24 hours then set the field back to Pending

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2019 09:18 AM
Hello Hannah,
I would suggest using a workflow for this. You could use a Timer in the workflow to wait 24hours and a WaitFor Condition to check that its all good still. Then add the script after that to update your field back to pending.
Let me know if you need help with this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2019 09:20 AM
Okay thank you both! How would you use a workflow just for a field on a table? I only know how to use workflows for requests...so if you could please help me with how to get the workflow started that would be great

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2019 09:30 AM
In your business rule that you already have made. Just start the workflow from there.
var wflw = new Workflow();
wflw.startFlow(wflw.getWorkflowFromName('give the workflow name'), current, 'update')