You need to sign in to do that
Don't have an account?
Arc30
Custom Console footer
Hi
Regarding this issue
Class
Public Class NewAccount
{
public NewAccount(ApexPages.StandardController controller) {
}
Public String name{get;set;}
Public String accid{get;set;}
public NewAccount(){
}
public PageReference saveacc()
{
Account acc=new Account();
acc.name=name;
insert acc;
accid=acc.id;
PageReference acctPage = new PageReference('/001');
acctPage.setRedirect(true);
return acctPage;
}
}
Page
<apex:page extensions="NewAccount" standardController="Account">
<apex:includeScript value="/support/console/30.0/integration.js"/>
<apex:includeScript value="/soap/ajax/26.0/connection.js"/>
<apex:includeScript value="/soap/ajax/26.0/apex.js"/>
<apex:form >
Name of the New Account <apex:inputtext value="{!name}"/>
<apex:commandButton value="Create" action="{!saveacc}"/>
</apex:form>
</apex:page>
Please tell the issue
Archith
Regarding this issue
- Create a footer console component to create an account.
- After saving the account , a new primary tab should be opened.
Class
Public Class NewAccount
{
public NewAccount(ApexPages.StandardController controller) {
}
Public String name{get;set;}
Public String accid{get;set;}
public NewAccount(){
}
public PageReference saveacc()
{
Account acc=new Account();
acc.name=name;
insert acc;
accid=acc.id;
PageReference acctPage = new PageReference('/001');
acctPage.setRedirect(true);
return acctPage;
}
}
Page
<apex:page extensions="NewAccount" standardController="Account">
<apex:includeScript value="/support/console/30.0/integration.js"/>
<apex:includeScript value="/soap/ajax/26.0/connection.js"/>
<apex:includeScript value="/soap/ajax/26.0/apex.js"/>
<apex:form >
Name of the New Account <apex:inputtext value="{!name}"/>
<apex:commandButton value="Create" action="{!saveacc}"/>
</apex:form>
</apex:page>
Please tell the issue
Archith