Delay Redirect from a Record Producer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2011 12:41 PM
I'm looking for a way to set a timer or delay before my record producer redirects to the record it just created. When a user is redirected to a record right away, often they'll see an incomplete record and/or records in the wrong state because the workflow (several of which take a few seconds) hasn't completed. To see the updated record, they're forced to reload the form, which isn't very user friendly.
Has anyone run into a similar issue? Any suggestions on how to implement a "delay" or even a forced reload of the record?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2011 01:11 PM
I'm not sure if it will work or not but you could try the following right before your 'action.setRedirectURL' statement in your UI action...
gs.sleep(1000); // sleep for 1000 milliseconds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2011 01:52 PM
gs.sleep definitely delayed the redirect, but unfortunately seemed to also delay inserting the record / kicking off the workflow. The search continues... Thanks for the suggestion!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2011 04:09 PM
Another shot in the dark, but maybe you can put the sleep after the redirect command.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-04-2011 06:36 PM
You could redirect to a UI Page that shows some sort of loading icon and then directs back to the record after a few seconds. I think you'd have to pass the sys_id of the record you created to the UI Page as a parameter so you can redirect from the UI Page back to the record.