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
akevoakevo 

Save button not working on Visualforce page

I am trying to use Visualforce page for one record type. I have overrrieden the standard page with a link in a visualforce pages and that works well.

 


I am having problems with the Save button. When I try to save it keeps refreshing the edit page:
in my Edit page:
<apex:page standardController="Opportunity"
extensions="ActionEditController" id="page" action="{!if($CurrentPage.parameters.RecordType != '012P00000004OyQ',urlfor('/006/e',null,[RecordType=$CurrentPage.parameters.RecordType],true),'')}">

The save button as follow:
<apex:commandButton onclick="PicklistsAndValidate();"
action="{!save}" value="Save" />


When I create a new record, I get the VF page, but when I click on save, nothing happens!

 

I would appreciate help on this!

kiranmutturukiranmutturu

i too get the same problem and i did with my own function in the save apart from standard save...

newVFdevnewVFdev

Kiran,

how does your save function look like? can you post the code? does your function work?

Thanks,

Julienne

kiranmutturukiranmutturu

<apex:commandbutton action="{!save}" value = "save"/>

 

method:

 

public pagereference save(){

 

 

      //some code here 

 

return null;

}

akevoakevo

I am still trying to figure what is wrong with my code. Can anyone help me out?

kiranmutturukiranmutturu

its not the problem with u boss... but dont waste the time in that i gave you the work around in the above post just try that.. 

aballardaballard

Does your page include apex:messages to display any errors that are occurring when you try to save?  Are there any required fields that have not been filled in?