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
Karthick RajaKarthick Raja 

Override standard save and edti button in visualforce page

Hi folks,
         Can anyone tell me how to override the save and edit button in visualforce page?
I want to use the two boolean variable in that save button method with same functionality
I have tried the following code for this usecase

    public PageReference save() {
        showContent = true;
        hidecontent = false;    
        return null;

But the save functionlity not working here

Thanks in advance
      Refer the sample code
<apex:page standardController="Case" extensions="CPCaseDetailCls" showHeader="false" standardStylesheets="false" >

Now use one commnad button  like this . Please use the input field to enter data then use command button
   <apex:commandButton value="Save" action="{!savestatus}" title="Save"/>


=================controller extension  code==========

// just use this method inside your controller code and please create all variable according to your need

 Public void savestatus(){
        Case NewCase = new Case();
           NewCase.subject=variable name;
         NewCase.status= variable name;
            NewCase.Descripiton = variable name;
          INSERT NewCase;  // Inserting the new case into database;