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
mbbendermbbender 

Working with the return from a remoteFunction call

I'm having some trouble getting data from PHP back to my salesforce javascript s-control.

I'm calling the remoteFunction and the PHP script is being called and generating data as expected. The response time for the PHP script to finish is probably near the 10 second timeout period.

1) Can the 10 second timeout with the remoteFunction be modified?

I would like to process the returned data from php. How do I return data to the onSuccess callback? In my PHP code I've tried print($returndata) and  return $returndata to get the JSON formatted string back to salesforce. I've not had any luck with either.

When I call the remoteFunction method the onSuccess function immediately is called and executed. If I wait about 5-10 seconds my PHP print() statement will print to the sforce debug console window.

I would like to onSuccess callback to be called when the PHP returns it's information. I've tried setting the async argument to false but it did not change operation and onSuccess is still called immediately.

Any ideas on how to get my PHP data back to salesforce when using the remoteFunction method?