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

Form submission in Salesforce1

I have a Vf page with few input fields and controller associated with the vf page has some logic and inserts data. This is working fine in classic app. I am trying to move the same vf page to salesforce1 mobile app using publisher action. The page renders fine in mobile but submit is not working. I know we have to use remote action call to invoke the method in controller, but here in my case if I have 10 input fields do I have to pass all 10 as params to the remote action method or is there an alternative?
Thanks in advance.
Hi , 

You have to just add 1 DML method which will update all the values (10) in it. 

See some sample code below, 

<script type='text/javascript' src='/canvas/sdk/js/publisher.js'></script>
    Sfdc.canvas.publisher.subscribe({name: "publisher.showPanel",
        onData:function(e) {
            Sfdc.canvas.publisher.publish({name:"publisher.setValidForSubmit", payload:"true"});
    Sfdc.canvas.publisher.subscribe({ name: "",
        onData: function(e) {
            alert("call some remote action here");
            Sfdc.canvas.publisher.publish({ name: "publisher.close",
                payload:{ refresh:"true" }});