Navigation

Thursday, October 21, 2010

Thursday, September 16, 2010

Combine Related List of Same Object to display as one List




Merging Related List for the same object (Part 1)




One of the most popular issues that people face during Salesforce.com implementation is managing related list of the same object. Salesforce.com doesn't provide an out of the box way to combine related list from the same object for two or more Lookup fields. I faced the same issue during several implementations where client asked me to combine the related list in to one list.

To overcome this challenge you will need to customize Salesforce.com to merge the two related list records. 

I am going to use an example posted on Ideas and show you a way to resolve this issue.



"I have two custom objects, Lab Projects and Employees. Any given Lab Project always has two Employees assigned, using lookups, and Employees can change roles between projects (Lead one time, Support the next). (Top image) This causes two separate related lists to show up on an Employee's page. (Middle image) It would be great if I could combine these two lookups on the Lab Project to appear in one combined related list on the Employee page. (Bottom image) Note: This should only work when dealing with multiple lookups on the same data type. source (https://sites.secure.force.com/ideaexchange/apex/ideaview?id=08730000000BqNCAA0)"

While I was reading through the post on Ideas I did see that people were discussing that there is no resolution to maintaining many to many relationship between two objects. You will ALWAYS NEED A THIRD OBJECT for maintaining the relationship in any data structure model whether it is on the cloud or on premise solution or even if you are using a simple database structure like Access or complex data model such as Oracle or MSSQL Server,. However there are creative ways on how you can overcome this seamlessly in the user interface.


if you need to associate more than two Employees to the Lab Project object then simply create a "Junction / Connector" object. However if you only have two fields and you would like to maintain a single related list then please proceed ahead.



In this post I will give you a brief overview on how to combine the two related list. In part II of this post I will show you in detail on how to implement this solution. 

In Part II I tend to cover some of the more complex customizations such as writing apex trigger, creating a custom button etc.




Solution: 




Step 1: Create a third object called "All Analyst." Make sure that you make the record name Auto Numbered.


Step 2: Create two Lookup fields on the newly created object and a Text field with 255 characters

  • Employee (Lookup - Employee object)
  • Lab Project (Lookup - Lab Project object)
  • Role (Text - To store the role of the employee)

Do not show the "related list on the Lab Project Page Layout.






Step 3: Develop a trigger on Lab Project to create a record on the junction object.

Step4: Adjust the employee page layout as shown below by removing the related list created by adding the lookup fields on Lab Project object. Replace "New All Analyst" button with your custom button.








Why do you need to replace the button on the All Analyst related list: 

The out of the box button when clicked will create a junction record between employee and the lab project. User may require to directly create a lab project record directly from the employee page. 




For example, when you are on Jane Doe's record you can click on a button to create a new Lab Project. We also want to have the ability to choose if Jane Doe is a Lead Analyst or a Support Analyst for this new Lab Project that we are about to create. Hence to create a lab project record from Jane Doe's page w




e need to create two custom buttons, New Lead Analyst and New Support Analyst as shown below.




If you clicked on the "New Lead Analyst" button from Jane Doe's page layout a new lab project will be created which will automatically put Jane Doe on the Lead Analyst field as show below.





Wednesday, September 8, 2010

Rupesh Desai

About Me


I am a business process consultant with experience in full cycle software development, CRM strategy, and Digital Marketing. I have done projects from concept to completion, where i was involved in choosing or developing the right CMS system. Developed framework and analytics architecture for B2B as well as B2C websites. 

At West Monroe Partners I was involved mostly with the Customer Relationship Management and Business Intelligence teams. As part of the CRM team, I focus on implementing and customizing several CRM software solutions and reporting services, along with CRM strategy. As part of the Business Intelligence team, I utilize SQL Server Analysis, Integration, and Reporting Services to successfully complete projects.

I am also a certified in the following:
- Certified Salesforce Administrator
- Certified in Google Analytics

For detail work experience please visit my linked in Profile at http://www.linkedin.com/in/rupeshdesai

Professional Summary






· Proven negotiation skills with demonstrated ability to build and maintain strong business relationships with diverse client base.
· Experience in developing strategic process for search engine optimization and web analytics implementation for fortune 500 companies.
·  Diverse experience in developing online web analytics architecture using Google Analytics, Omniture, and Web Trends. I have consulted clients on strategic implementation of Web Analytics package including transition process from Google Analytics to Omniture and vice-versa.
·  Developed customized Google Analytics tagging architecture and reporting module. Implemented custom integration of web analytics application with a CMS framework such as SiteCore, and Vignette.
·  Rich data-mining experience, including the creation of propensity-to-buy models. Performed analysis-using tools such as SPSS and Cognos.
·  Domain expertise in next generation digital marketing such as Web 2.0 strategy and mobile computing. Smartphone Integration with online sites. Developed custom analytics tracking for Windows Mobile application and IPhone application.
·  Managed implementation and customization of several CRM software solutions Used Salesforce.com and Microsoft Dynamics as a platform combined with SQL Server Analysis, Integration, and Reporting Services.
·   I have been a technical lead for Salesforce.com projects, and have trained 100+ users across the country in several organizations.

Salesforce Administrator Training (ADM-201) Self Start Guide

This blog is moved to http://rupeshdesai.com/2011/07/27/salesforce-administrator-training-adm-201-self-start-guide/


Thank You.