+ Start a Discussion
Sammy7Sammy7 

Visualforce page for account/asset view for certain accounts

Hi, 
 I'm new to visualforce and was wondering if the following is possible:

I would like to create a tab for "Important accounts" and be able to view 5 different accounts with ONLY their asset related lists. 
so when I click on the tab I want to see: 

Account 1
Asset related list for account1
Account 2 
Asset related list for account2
....
Best Answer chosen by Sammy7
sfdcsushilsfdcsushil
Simran, What do you mean by editor? As you gave your requirment in question, you need a tab for importan accounts? So you need to create a custom controller where you can fetch all important accounts through query and their related Assets. You may create a map in controller to store account and corresponding assets. e.g. Map<Id, List<Asset> mapAccountAssets = new Map<Id, Asset>();. And the create a vf page which referes to above controlle and uses map to display data. 
Below is the link for creating any custom controllers 
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_custom.htm

All Answers

sfdcsushilsfdcsushil
Yes, it should be possible. 
Sammy7Sammy7
Whats the syntax/attribute for showing the contact list for a specific account ID? For instance id=0013600000Xae39

 
Sammy7Sammy7
I guess I should clarify if this is possible or not:
Instead of assigning the id here: https://na30.salesforce.com/apex/visualforcepage?id=0013600000Xae39
Is it possible to pass the value in the editor for the standard controller?
How would you do this?
sfdcsushilsfdcsushil
Simran, What do you mean by editor? As you gave your requirment in question, you need a tab for importan accounts? So you need to create a custom controller where you can fetch all important accounts through query and their related Assets. You may create a map in controller to store account and corresponding assets. e.g. Map<Id, List<Asset> mapAccountAssets = new Map<Id, Asset>();. And the create a vf page which referes to above controlle and uses map to display data. 
Below is the link for creating any custom controllers 
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_custom.htm
This was selected as the best answer