Skip to main content

The ways in which one can invoke Apex from script( https://community.skuid.com/t/calling-apex-function) increase the API request count(except if you use skuid:page and include your skuid page in a visualforce page).


Why is the following way for apex remoting not supported?


namespace.ControllerName.MethodName([Parameters],

function(result, event){

//In this callback function the response is handled in asyn.

});


Because eventually what we see is a Visualforce page as the url(/apex/skuid_ui?params) has ‘/apex/’.

First of all, the title of your question is inaccurate — Visualforce Remoting requests do NOT consume Salesforce API calls.


As far as the second part of your question, the reason that you cannot call a generic Apex controller method from Skuid’s UI visualforce page (accessed through /apex/skuid__ui) is that Apex doesn’t support dynamic method invocation except through their “Invocable Method” annotation — but if invoke an invocable method, they charge you an API request.


The only way that additional JavaScript Remoting Apex methods can be exposed to Skuid in Visualforce in the format you’re asking about (namespace.ControllerName.MethodName() etc…) is to create a separate Visualforce Page and specify your own Apex controllers on it. Skuid’s UI Visualforce Page is in a managed package and so it’s impossible for us to add in additional customer controllers to it, that’s why we offer you the approach of creating a separate Visualforce Page and then using the skuid:page component — this way you can add in whatever controllers you want and be able to call them from that page.