+ Start a Discussion
bharath lagishettybharath lagishetty 

Formula Expression is required on the action attributes.

please help me to solve this when i enter the values and claic on save fomula expression error is coimng

<apex:page controller="harish">
  <apex:form >
  <apex:pageBlock >
  <apex:commandButton value="save" action="harik"/>
  <apex:pageblockSection >
  <apex:outputLabel value="fax"></apex:outputLabel>
  <apex:inputText value="{!fax}"/>
  <apex:outputLabel value="phone"></apex:outputLabel>
  <apex:inputText value="{!phone}"/>

public class harish {
 public string name{get;set;}
 public string fax{get;set;}
 public string phone{get;set;}
 public void harik(){
 lead ac=new lead();
 insert ac;
kevin lamkevin lam
You need to change the action attribute of the commandButton:

<apex:commandButton value="save" action="{!harik}"/>
kumar tanwarkumar tanwar
Hello bharath,
If we bind any server side action and variable then we use Formula Expression.Like:-
You replace code with below code:
<apex:commandButton value="save" action="{!harik}"/>
For more detail see below link.:-