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
priya bhawna shettypriya bhawna shetty 

visualforce with custom buttons related

Hello guys
can u guys help me with this requirement.

i have a visualforce page with 4 empty account  inputfields with 2 custom buttons save and clear .
so my question is
1.save button must insert , as well as it should give the ability to edit the previous data to insert new values as different data in vf page .
2.clear button must clear the data,allowing as to enter new data in vf page.

thanks in advance
Sonam_SFDCSonam_SFDC
Hi Priya,

for the req 1 : please refer to the link below which has sample code to insert a records and redirect to the detail page from where you can again edit it:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_system_pagereference.htm

req 2: check the below link to get sample code to reset the form you are submitting to save a rcord: http://salesforce.stackexchange.com/questions/27666/form-reset-after-clicking-a-button