Difference between Synchronous and asynchronous in Servicenow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 03:57 AM
Could anyone please help me on a good scenario with Difference between Synchronous and asynchronous in Servicenow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 04:07 AM
HI Manmat,
I hope you are asking about Synchronous and asynchronous GlideAjax Calls. If yes then the best scenarios would be
1) Synchronous: Any validation you want to perform before the form submits on client side. For ex you want to check if a field on other table has data or not for this you will make a Synchronous Ajax call to get the Data from Server Side to client and based on response you may submit the record or return false.
2)Asynchronous: If you need to perform any server side action and there is no need to show anything on current form . i.e. for any background server actions you can use Asynchronous Ajax.
For more details: GlideAjax
Regards,
Vijay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 04:21 AM
In short, async happens "in the background". The user doesn't wait.
Synchronous holds the client's browser hostage while it waits for a response from the remote system.
This is often seen in HTTP requests (GlideAjax, REST calls, etc.) The recommended way to do this is async as it doesn't create unwanted latency or bad experience - however there are rare cases where you MUST wait for a response before proceeding.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2017 11:35 AM
Hi Chuck,
Do we have any server side api which works asynchronously like GlideAjax works on the browser end ?
Regards,
Kshitij
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2017 11:55 AM
what the business use case here, you can have the Async Business Rule to run the script asynchronously, but what is the requirement?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-05-2017 07:31 AM
HI Manmat,
Please Mark Answer as correct or helpful accordingly.
Thank you,
Ashutosh