+ Start a Discussion
Arc30Arc30 

Custom Console footer

Hi

Regarding this issue
 
  1. Create a footer console component to create an account.
  2. After saving the account , a new primary tab should be opened.
I am done with 1st step and able to save the account. I have not able to get the new account in the new primary tab. Kindly help me. I will share my code also

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