You need to sign in to do that
Don't have an account?
Matt Folger
Visualforce Error Help for this Page Formula Expression is required on the action attributes.
Trying to create a custom button in VF page that grabs a field value and then subtracts 1 from the presently queried record. Having trouble. I can built a button with the underlying code that renders the button but when I click it I get the error of this thread post:
"Visualforce Error Help for this Page Formula Expression is required on the action attributes."
I presume this is due to how it's calling the record, but don't know what to change.
"Visualforce Error Help for this Page Formula Expression is required on the action attributes."
I presume this is due to how it's calling the record, but don't know what to change.
<apex:commandbutton value="Return to Prev Dept" action="{!RPP_Tracker__c.Present_Dept_Number__c - 1}" />Probably a syntax error, what am I doing wrong?
All Answers
The action of a commandbutton needs to correlate to a method on your controller. For example, if your controller has a method named subtractOne() then you would do the following:
Do you want to subtract 1 and then update the Present_Dept_Number__c field with the new value?
Can you post your VF page and controller code?
Clint