I've created a custom button called Commit and I'm trying to call the following method using action = {!.commit}
,
Apex below
Do I need to do anything else to be able to call commit in my VF?
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityI've created a custom button called Commit and I'm trying to call the following method using action = {!.commit}
,
Apex below
Do I need to do anything else to be able to call commit in my VF?
The problem is probably that "commit" is a reserved word in Apex so you can't use it as a method or variable name. (When the compiler encounters such a word it has special meaning, it's part of the language.) Use a different name in the code and in the Visualforce.
Apex has a lot of these - see Reserved Keywords.