• acunyc
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

I need to change the button name from "New Event" to "New Appointment" on the Contact Detail realted list "Open Activities". 

 

I have tried to create a new button in the event button area, but this does not show as an option in the contact page layout "open activities" button area.

 

Any help would be appreciated.

  • March 28, 2009
  • Like
  • 0

Hello

I have a couple of custom object that logically can be grouped in a single Tab called options, besides the fact 

that i try not to litter too much main tab area  with tab per object

 

what I have done is VF page assigned to VF tab "Options". This page contains set of commandLinks (one per object). when clicked this command links redirect to separate detail VF page  per object .

This detail VF page is simple, something like this:

 

<apex:page tabStyle="Options__tab" controller="LocationsController">
   <apex:form >
    <apex:commandbutton value="Back to Options" action="{!Back}"/>
    <hr/>
   </apex:form> 
    <apex:ListViews type="UN_Locations__c" id="LocationList"/>
</apex:page>

 

In there I preserve the TabStype of main Options page and simply show ListView of the object

 

This is working extermely nice, until I click on an item, than i get the detail of the object (for edit, delete)

but than the style is different than default Options style and no Tab is selected on the standard Tab palette, so it is  kind of inconsistent where the user is.

 

How can I preserve the tab style in the detail page object? Does this mean I have to override New/Edit buttons with yet another set of VF pages just to put  tabStyle="Options__tab" in them?

 

Thanks in advance

  • February 24, 2009
  • Like
  • 0

I created tabs following the Tabbed Accounts in 30 seconds post and my problem is that whenever I perform an action on any tab other than the detail tab I'm returned to the detail tab after the action is completed instead of returning to the tab I was on.  

 

I tried to find code samples that my lead me to an answer and I thought maybe I had to create an standard controller extension which I attached below.  However, I'm very green at this so I don't really know how to continue so any direction and sample code would be greatly appreciated.  I'm sure I'm not the only one who has implemented this cool technique and has run into this problem.

 

Keith

 

VS Page:

 

<apex:page standardController="Account" extensions="accountExt" id="p"
showHeader="true" tabStyle="account" >
<apex:tabPanel switchType="client" selectedTab="name2" id="theTabPanel">
<apex:tab label="Details" name="AccDetails" id="tabdetails">
<apex:detail relatedList="false" title="true"/>
</apex:tab>
<apex:tab label="Contacts" name="Contacts__r" id="tabContact">
<apex:relatedList subject="{!account}" list="contacts__r" />
</apex:tab>
<apex:tab label="Invoices" name="Invoices" id="tabInvoice">
<apex:relatedList subject="{!account}" list="invoices__r" />
</apex:tab>
<apex:tab label="Open Activities" name="OpenActivities" id="tabOpenAct">
<apex:relatedList subject="{!account}" list="OpenActivities" />
</apex:tab>
<apex:tab label="Products Offered" name="ProductsOffered" id="tabProdOffer">
<apex:relatedList subject="{!account}" list="Products_Offered__r" />
</apex:tab>
<apex:tab label="Products Sold" name="ProductsSold" id="tabProdSold">
<apex:relatedList subject="{!account}" list="Product_Releases__r" />
</apex:tab>
</apex:tabPanel>
</apex:page>

 Controller:

 

public class accountExt {

String aId;
String pId;

public accountExt(ApexPages.StandardController controller) {
aId = ApexPages.currentPage().getParameters().get('aId');
pId = ApexPages.currentPage().getParameters().get('pId');
}

public PageReference redirect(){
PageReference pageRef = new PageReference('/'+pId);
pageRef.setRedirect(true);
return pageRef;
}

public void setState(String n) {
state = n;
}

public String getState() {
return state;
}

public PageReference methodOne() {
return null;
}

private String state = 'no';
}