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

remoteFunction with "async: true" expects return - causing timeout

I have a synchronous web service (written in C#) that takes a while to do some work. I'd like to make an asynchronous call to it from Salesforce using remoteFunction(), however, remoteFunction() expects its onSuccess property to be set to something, and I believe it also expects some sort of return from the web service, but if the web service doesn't return a value in a timely manner, a timeout occurs. I'd like to just have the remoteFunction() initiate the web method then not be concerned about a return value. The web method will do its work and send an email with a report when it's done. Is this possible?
In your c# server you should return 200 OK and then do the work.
Else the HTTP request is goign to wait for the response.