You need to sign in to do that
Don't have an account?
Brian Knowlton
Apex functions not being called from VF page
I have a button on a vf page (using std controller) that when clicked is supposed to call an actionFunction which calls an Apex method. The method does not get called however. I run a javascript method to see if something is happening and it is being clicked, but I cannot get it to call the Apex method.
function selectProduct() { console.log('clicked'); CallApexMethod(); console.log('Complete'); } <apex:form id="searchProducts"> <apex:actionFunction name="CallApexMethod" action="{!myActionInController}" onComplete="alert('After apex method') ;"/> <apex:outputPanel id="main"> ... <div class="selectButton"> <input type="button" value="Select" onclick="selectProduct();"/> </div>
Try using a command button, with an value of "{!selectProduct}"
Otherwise, call the name of the apex:Actionfunction that you delcared rather than the method in your controller. ie: onclick="callApexMethod"
Save error: Unknown property 'OpportunityStandardController.searchProducts' opportunityProductEntry.page
again, try using an apex:commandButton
or use the name of the apex:actionFunction that you declared on line 10. ie: "CallApexMethod" not searchproducts.