You need to sign in to do that
Don't have an account?
S Sai
No Need to move accout Object Page
<!---Page---->
<apex:page standardController="account" sidebar="false" showHeader="false">
<!----- Form --->
<apex:form id="ChangeStatusForm">
<apex:pageBlock >
<!----PAGE BLOCK ONE ------->
<apex:pageBlockSection title="ACCOUNT DETAILS">
<apex:inputField value="{!account.name}"/>
<apex:inputField value="{!account.accountnumber}"/>
<apex:inputField value="{!account.rating}"/>
<apex:inputField value="{!account.industry}"/>
</apex:pageBlockSection>
<!---- PAGE BLACK TWO ------>
<apex:pageBlockSection title="Category Details">
<apex:inputField value="{!account.type}"/>
<apex:inputField value="{!account.annualrevenue}"/>
</apex:pageBlockSection>
</apex:pageBlock>
<!---- BUTTON ------->
<div align="Center" draggable="false" >
<apex:commandButton value="SAVE" action="{!SAVE}"/>
</div>
</apex:form>
</apex:page>
When I am saving the account it's move to account object
I dont Want to move the account object. when i am saving the to stay the same page
How Plz Help....
<apex:page standardController="account" sidebar="false" showHeader="false">
<!----- Form --->
<apex:form id="ChangeStatusForm">
<apex:pageBlock >
<!----PAGE BLOCK ONE ------->
<apex:pageBlockSection title="ACCOUNT DETAILS">
<apex:inputField value="{!account.name}"/>
<apex:inputField value="{!account.accountnumber}"/>
<apex:inputField value="{!account.rating}"/>
<apex:inputField value="{!account.industry}"/>
</apex:pageBlockSection>
<!---- PAGE BLACK TWO ------>
<apex:pageBlockSection title="Category Details">
<apex:inputField value="{!account.type}"/>
<apex:inputField value="{!account.annualrevenue}"/>
</apex:pageBlockSection>
</apex:pageBlock>
<!---- BUTTON ------->
<div align="Center" draggable="false" >
<apex:commandButton value="SAVE" action="{!SAVE}"/>
</div>
</apex:form>
</apex:page>
When I am saving the account it's move to account object
I dont Want to move the account object. when i am saving the to stay the same page
How Plz Help....
Do the changes in the class as mention below:-
Thanks,
Keyur Modi
All Answers
You can use belove code in place of save method.
public pagerefrance save(){
// DML operation
return null;
}
Thanks,
Keyur Modi
You can try using extension controller
public with sharing class SaveAndReturnController
{
private ApexPages.StandardController controller;
public SaveAndReturnController(ApexPages.StandardController controller)
{
this.controller = controller;
}
public PageReference saveAndReturn()
{
PageReference cancel = controller.cancel();
controller.save();
return cancel; } }
<apex:page standardController="Test__c" extensions="SaveAndReturnController" tabStyle="Test__c">
<apex:page standardController="Test__c" extensions="SaveAndReturnController" tabStyle="Test__c">
Thanks
Anand
Thx For replying could u plz explain clearly with code. Here I am Using standard controller
use below code,that will help you .
Thanks,
Keyur Modi
When i am in insert the new data Here Not Clear the data
THANKS
SS
Do the changes in the class as mention below:-
Thanks,
Keyur Modi
Thank U Very Much
One More Doubt
i Want to create account related contact in Table Format
THANKS,
SS
How to create account related contact (Table format ) in visualforce Page