+ Start a Discussion
Mayte MartínezMayte Martínez 

Default access in contact module

Hi, I have the requirement: 2 tabs from Contacts: 1 of the tab is "Interlocutor" (spanish) and the another one is "Candidatos" both of them from contacts module.
I renamed the contacts for Interlocutor tab.
And for Candidatos one I created a new Tab (from contacts and through Visualforce: with follow code: <apex:enhancedList type="Contact" />)
What I need to do now is to filter the records for all the organization for each tab, I mean, as the origyn of the entire information is contact, i need to sepparate the data for each tab. If the user clicks on "Interlocutor" the system should filter "Automatically" the data from Contact with type = "Interlocutor"; and if the user clicks on the "Candidatos" the system should do the same but for contact type = "Candidato"
I guess this sould be done through visualforce in Candidatos tab, but I dont know how can I do this.
But for the Interlocutor tab, I have no idea! 
Can somebody help me on this subject? Please!!!!
Thanks!
Karelia.-
Best Answer chosen by Mayte Martínez
Krishna SambarajuKrishna Sambaraju
For candidatos you can add the listId attribute to enhanced list.
<apex:enhancedList type="Contact" listId="list_id_goes_here"/>
You can find the list id by inspecting the element using browser developer tools.List Id
You need to create a list view that filters the contacts with the type "Candidato". Then find the list id and use it in the enhanced list.

You can do same for "Interlocutor" by creating another visualforce page as "Candidato" and another tab using the visualforce page.
Hope this helps.

All Answers

David ZhuDavid Zhu
I don't think you can apex:enhancedList in your case.
You may create two list<contact> variable in controller extension. one for 'Interlockutor' and one for 'Candidato'.
Then use apex:pageblocktable (or apex:datatable or apex:repeat) to bind to different list on different VF page.
Arun KumarArun Kumar
You can do this by creation recordType and then use the with the standard controller with VF page.
Arun KumarArun Kumar
Hi,

You can use below approach:

<apex:page> <apex:enhancedList type="Case" height="300" rowsPerPage="10" id="YourListViewId" /> </apex:page>
  • Create two List View with your filter values.
  • Create two VF pages witht he ListViewId
  • Create two VF tab, 

Thanks,
Arun
 
Mayte MartínezMayte Martínez
Thank you guys! I will test your options and will post it here the result ;-)
Krishna SambarajuKrishna Sambaraju
For candidatos you can add the listId attribute to enhanced list.
<apex:enhancedList type="Contact" listId="list_id_goes_here"/>
You can find the list id by inspecting the element using browser developer tools.List Id
You need to create a list view that filters the contacts with the type "Candidato". Then find the list id and use it in the enhanced list.

You can do same for "Interlocutor" by creating another visualforce page as "Candidato" and another tab using the visualforce page.
Hope this helps.
This was selected as the best answer
Arun KumarArun Kumar
Hi Mayte,

Please let me know if the helps.

As a common practice, if your question is answered, please choose 1 best answer.
Additionaly you can give every answer a thumb up if that answer is helpful to you.

Thanks,
Arun
Mayte MartínezMayte Martínez
Hi, I created two visualforce pages and 2 contact list with filter on record type, for each page I set: 
<apex:enhancedList type="Contact" listId="list_id_goes_here"/>
And inactivated the Contact module for the profile.
And it Works! thanks to all :-)