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
T@IHGT@IHG 

Tabbed Accounts - Possible to Fill a Tab With An Account Section?

I would like to further breakdown our account page into tabs, but not only for the Related Lists.

 

Is it possible to have a tab which corresponds to one of the sections within the Account page?  Obviously, it would be possible to construct the entire thing field by field, but is there a quicker way to do it by referencing the section itself (and therefore getting all of the fields that are already defined within it?

 

I was looking for a way to reference the page section by name or ID, but there doesn't appear to be a way to do that for an entire section at a time.

 

Any ideas?

Best Answer chosen by Admin (Salesforce Developers) 
cjulihncjulihn

Use field sets. Add all the fields from a section to a feild set. You can change the fields in the field set, and your page will automatically update.

 

<apex:repeat value="{!$ObjectType.Account.FieldSets.FieldSetNameHere}" var="f">
      <apex:outputField value="{!Contact[f]}">
      </apex:outputField>
</apex:repeat>

 

All Answers

cjulihncjulihn

Use field sets. Add all the fields from a section to a feild set. You can change the fields in the field set, and your page will automatically update.

 

<apex:repeat value="{!$ObjectType.Account.FieldSets.FieldSetNameHere}" var="f">
      <apex:outputField value="{!Contact[f]}">
      </apex:outputField>
</apex:repeat>

 

This was selected as the best answer
T@IHGT@IHG

That worked great - need to do a little layout tweaking, obviously, but that worked great.

 

Thanks for your quick input!

 

*** Also, for anyone else that looks at this solution in the future, I had to change the code slightly to include the Account as the referenced object in the output field instead of Contact, but that is easy stuff.

cjulihncjulihn

Your welcome. And yes it would be nice if there was a way to do drag and drop layout from the field set itself.

 

Best,

Corey