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
Anand Avinash DosapatiAnand Avinash Dosapati 

Formula Expression is required on the action attributes - VF page Error

Hello Friends,

I have the following simple VF page which is giving the metioned error. I verified with back slash and curely braces suggestions from other posts which didn't helped me to fix the issue.
 The below VF page is invoked by clicking a custom button.

Please help me to identify and fix the issue
<apex:page standardController="Opportunity" extensions="SendRetainerController" showHeader="false" sidebar="false" action="{!SendRA}">


</apex:page>

Error:

User-added image

 
ANUTEJANUTEJ (Salesforce Developers) 
Hi Anand,

I have found a thread in which it stated in case if there are any page refernces where you wrote a path without begining with '/' you would be getting the error could you please check if there are any and try correcting them.

Ex: Instead of writing in this wasy ===> "pagereference redirect = new PageReference('/apex/newPage');"

it was written in the below manner which caused the error "pagereference redirect = new PageReference('apex/newPage');"

Please check and in case if it helped please close the thread by marking it as the best answer so that it can be useful for others in the future and also helps in keeping the community clean.

Regards,
Anutej
Anand Avinash DosapatiAnand Avinash Dosapati
Hello Anutej,

Thanks for your response. but there is no pagereference method used in the VF code shown above.
ANUTEJANUTEJ (Salesforce Developers) 
Hi Anand,

Can you please check if there are any syntctical errors that might be present in the controller that might be causing the error.

Regards,
Anutej
Anand Avinash DosapatiAnand Avinash Dosapati
I am able to find the issue, hope this helps somone in future.

The method in the action attribute is returning a value which is not being captured in the VF page. As I don't need the value here, replaced the method return type to void which resolved the error.

Thanks