function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
soorya rsoorya r 

how to make remote action as a synchronous one?

Hi All,

I am using Remote action in my code. Now it is working as a asynchronous mode.It is not waiting for the response, it will execute the next set of code. 

Can we make remote action execution as a synchonous one? 
If it is not possible, please tell me the alternative solution for replacing the remote action with synchrounous functionality.

Please help me! It is Urgent!

Thanks in Advance!
 
Ajay K DubediAjay K Dubedi
Hi Soorya,

JS remoting by behavior is asynchronous. Depending on what your use case it, you should have the appropriate logic in your callback handler to ensure that 
the correct sequence of operations is executed.

You can refer to these threads which discussed this in more detail - http://salesforce.stackexchange.com/questions/18918/is-it-possible-to-make-remote-action-asynchronous
https://developer.salesforce.com/forums?id=906F000000097AuIAI

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi