- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2020 10:26 AM
I am using gs.sleep(5000) in after business rule ,when i submit form it is waiting for 5 seconds to submit ,does gs.sleep haluts form submission if we use it in after business rule??
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2020 10:31 AM
Hi,
Instead of using gs.sleep() use events for triggering that BR, it's best practice. Here's an example of delay applied on business rule and trigger event:
var when = new GlideDateTime();
var delay = new GlideTime();
delay.setValue("00:00:05");
when.add(delay);
gs.eventQueueScheduled("event_name", current, "", "", when);
If it was helpful, please give positive feedback.
Thanks,
☆ Community Rising Star 22, 23 & 24 ☆
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2024 06:38 AM
Does it work in a scenario of interval between retries?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2025 11:07 AM
Thanks a lot Adrian, really helpfull for me too