VF Remoting - How to pass values?
Closed this issue · 2 comments
Hi,
I am a frond end developer and not a SalesForce guy. I having been using this plugin for a recent SF project and its awesome. But, i am facing one problem currently.
I am using 'vfr.send' method for calling RemoteAction methods. I have no problem in the 'GET'(or select) method. But, during 'POST' i don't know how to pass value to the RemoteAction method.
Tried passing value in the options like
vfr.send( Controller.methodName, { name : 'Jhon' }, false );
But, this is not working.
Can someone point in right direction by tell how to pass values from JavaScript or how the SF remote method should be written to get the value?
Thank you.
I have used it as follows:
var putMethod = vfr.send('Controller.methodName', {escape: false, timeout: 10000}, false);
putMethod( {name: 'John'} ).then(function( returnValue ) {
/* returnValue will be what ever is returned from the controller method */
........
});
Hope this helps;
@davehahn , That's worked like a charm.
You are a life saver. Thanks a ton.
I am closing this issue.