Ask Search:
Chris GordonChris Gordon 

I am attempting to build a stage duration report to show the length of time opportunities average in each stage.  Anyone have any tips?

Best Answer chosen by Miglena ( 
Steve MolisSteve Molis
1. Create an Opportunity History Report.
2. Then select Summary or matrix as the Report format.
3. Group the Report by Opportunity History: From Stage
4. Select the Stage Duration field and Summarize(Average)
5. Get me a beer (because you owe me) 
User-added image
Martin O.Martin O. 

The problem?

I took over operations at my org recently and the data model is a mess. There are tons of objects that are not used and there have been fields created here and there that are abandoned, not set up properly or partially populated a long time ago. Just to give you an idea, for leads there are almost 30 standard objects, but 80+ custom objects, but on contacts, 30 standard and 47 custom objects. On accounts we have 24 standard and 35 custom fields, with barely any validations and there are definitely missing relationships between objects.

What do I need?

Now, to start an overhaul I want to get a view of the big picture - list all objects, bucket them in "used", "will probably delete" and "have to investigate". Due to the high number of custom fields and messed up or missing relationships I am looking for a way to use Schema Builder on steroids - I need to be able to see the all objects with their full list of elements (Schema Builder allows you to see a full list only when you click Show more if the list is longer, which is the case with most objects I deal with), differentiate system, standard and custom, display both element names and element labels ideally, show all elements and distinguish between custom and standard, show which fields are mandatory, what the field types are, what the relationship between a specific field and fields from other objects is (lookup and master record relationships), tell managed packages apart (since I need to get rid of a bunch of those too). The bolded bits aren't possible in Schema Builder.

What did I try?

I did try to use the only really usable related plug-in/app ERD Tool but I need to work with at least 6 objects to start with, 11 would be the expanded bunch I really need to evaluate for the job to be complete and this tool is cumbersome in the way it visualizes it, has no way to save them, has no way to print them and does not use the naming that SFDC gives objects which makes it even harder to work with as I have to examine each Standard Object I'm granting it access to. It also doesn't fulfill most of the features Schema Builder now has.

I also managed to use SchemaPuker to get the PostgreSQL Schema Output for our Salesforce ERD. The problem is - where do I plug this in? I tried to use LucidChart, but when I dump 6 objects on it makes it impossible to work with already, not to mention that most of the things Schema Builder does are lost in the process and I'd have to reinvent them, so an inconvenient UI is a dealbreaker. I read that I could use a Visio export from LucidChart but hit a wall with actually getting access to that. First I use a Mac and Visio by MSFT is available on the web only for viewing, not to mention that my org doesn't seem to have a VIsio license.

Can anyone help? If I don't have this foundation it would take me significantly more time to nail down the areas I want to improve and prioritize.

Best Answer chosen by Martin O.
Devanand ManiraoDevanand Manirao

Hi Martin,
Since you have so many fields it may not be a good idea to depend on any visual tools.
If you an excel person, you can look dumping all your objects, fields into an excel and analyse them one by one.

Tools and Ways to fetch metadata into an excel...
You can run this from workbench and export as CSV

Here is a sample query that can give you a list of fields on the account object.

select id,DataType,NamespacePrefix,DeveloperName 
from FieldDefinition 
where EntityDefinition.QualifiedApiName = 'Account'

To get a list of objects (entities) you can use this SOQL 

SELECT DeveloperName,DurableId,Id,QualifiedApiName,RunningUserEntityAccessId FROM EntityDefinition limit 100

Refer to

select id from ValidationRule - list of all validation rules (doesn't work from workbench) but can try from query editor in developer console (Enable Tooling API checkbox)

Workbench gives u a list of all metadata components but cannot downloaded i guess.

If you manage to make use of this and create some smart excel templates please do share with the wider community will be handy .

There are other ways to get metadata but i feel for the type of review you want to perform and cleanup excel is better ., you can easily add some columns to mark which fields you want to remove, which are retained etc.. 
Prabhat SinghPrabhat Singh 
Hello Team,

Trying to embed tableau dashboards in salesforce.

Please help me to achieve this.

Best Answer chosen by Prabhat Singh
Naveen DhanarajNaveen Dhanaraj
To Embed the Tableau Dashboards into SFDC:
Tableau enables to embed the dashboards into just in few minutes. Following are the steps for the same:
  1. Login through Admin using
  2. Go to Setup tab and select Manage your Custom Tabs
  3. Select Web tabs and click Next and follow the below steps:
  • Choose Layout as per the requirement and click Next
  • Define Content and Display properties by providing necessary details
  • Enter URL Details and click Next
  • In Add to profiles select the users who can view the dashboards and click Next
  • Add to Custom Apps and Save
4.Dashboards would then get embedded into SFDC and a tab by the name “Tableau after Login” would appear.

For Further Classification Check This,
Steve MolisSteve Molis 
Here's a Formula I built to create an "Ultimate Parent Account" field that you can use to create Opportunity Pipeline reports that roll up all Opportunities under the top Account in the hierarchy. 

*** in this example I'm testing up to a 5 Tier Account Hierarchy (Compiled size: 342 characters) ***

Datatype: Formula 
Result: TEXT 
IF(NOT(ISBLANK(Parent.Parent.Parent.Parent.Parent.Name)), Parent.Parent.Parent.Parent.Parent.Name,
IF(NOT(ISBLANK(Parent.Parent.Parent.Parent.Name)), Parent.Parent.Parent.Parent.Name,
IF(NOT(ISBLANK(Parent.Parent.Parent.Name)), Parent.Parent.Parent.Name,
IF(NOT(ISBLANK(Parent.Parent.Name)), Parent.Parent.Name,

Best Answer chosen by Miglena ( 
Steve MolisSteve Molis
An #AWESOME bonus tip from @Jeremiah Dohn to turn the Ultimate Parent into a Hyperlink to that Account

Datatype: Formula 
Result: TEXT 
IF(NOT(ISBLANK(Parent.Parent.Parent.Parent.Parent.Name)), Parent.Parent.Parent.Parent.Parent.Id, 
IF(NOT(ISBLANK(Parent.Parent.Parent.Parent.Name)), Parent.Parent.Parent.Parent.Id, 
IF(NOT(ISBLANK(Parent.Parent.Parent.Name)), Parent.Parent.Parent.Id, 
IF(NOT(ISBLANK(Parent.Parent.Name)), Parent.Parent.Id, 
IF(NOT(ISBLANK(Parent.Parent.Parent.Parent.Parent.Name)), Parent.Parent.Parent.Parent.Parent.Name, 
IF(NOT(ISBLANK(Parent.Parent.Parent.Parent.Name)), Parent.Parent.Parent.Parent.Name, 
IF(NOT(ISBLANK(Parent.Parent.Parent.Name)), Parent.Parent.Parent.Name, 
IF(NOT(ISBLANK(Parent.Parent.Name)), Parent.Parent.Name, 

William NealonWilliam Nealon 
Getting: There was an unexpected error in your org which is preventing this assessment check from completing: System.QueryException: List has no rows for assignment to SObject

Object: Fulfillment

Entry Criteria: [Fulfillment__c].Status__c = Cancelled AND [Fulfillment__c].Schedule_Date__c > TODAY()

Immediate Actions: 
Based on [Fulfillment__c].Opportunity.OpportunityLineItems

Field Update Filter condition : 
Line Item ID  equals Formula [FullFillment__c].AdventurePackageId__c

Field to Update :
Sales Price equal to [Fulfillment__c].Deposit__c

I updated the "Required" on Contact to false and changed "What to do if the lookup record is deleted?" to "Clear the value of this field".

Testing seems to be working correctly. Only thing I see in Developer Console are 4 debug logs, all say "Success".

Best Answer chosen by William Nealon
Bill PowellBill Powell
Had the same issue, been racking my brain over it for days and finally found the solution on challenge #6. 

Your comment about unrequiring "contact" (explorer) helped guide me in the right direction. I unrequired it in opportunity products and "allow delete" like you said. However since the package installed for the LEX superbadge creates another layout, it requires it on the layout as well. So you'll have to unrequire it on the layout too. I did that and it worked.

Let me know if that helps 
Margo LynottMargo Lynott 
How do I get the "Account Name" field to auto-populate with Lead First Name+Lead Last Name?
Best Answer chosen by Margo Lynott
Steve DoddSteve Dodd
OK...I think that may be the problem...why wouldn't you just do both of these in one process as two different immediate actions ?

User-added image
Jackie TraviesoJackie Travieso 
I have a client who is using the free version of MailChimp. We've integrated it with Salesforce, but have found that the connection to Salesforce campaigns is missing. Is it possible to integrate MailChimp Campaigns with Salesforce's Campaigns in order to automatically make the recipients/responders members of the Salesforce campaign, plus get closed loop reporting?

Thank you!
Best Answer chosen by Jackie Travieso
Deepak AnandDeepak Anand
The out of the box Mailchimp for Salesforce doesn't integrate with Campaigns object. They have a Custom Object called Mailchimp Campaigns that stores information from MailChimp such as the Analytics, Reports etc. May be the intention was to make it available for all the Sales Cloud editions even for the Group which doesn't have the Campaigns feature.

Now, if you're doing this for a Client that is on the Enterprise then you could think about using the Process Builder to get around the limitation. The idea would be to create a Process on top their Custom Object called Mailchimp Campaigns. It would trigger whenever a record is created under that object and as a result of which a Create Record action would fire that creates a corresponding record with all the details in the native Campaigns object.
Lesa DoyleLesa Doyle 
I have a simple formula field, field 1/ field 2.
My problem is I cannot remember the string to use when field 1 is blank and field 2 is blank, to prevent my fomula field from producing #error 
Best Answer chosen by Lesa Doyle
Deepak AnandDeepak Anand
Try this = 
    BLANKVALUE(Field2__c, 0) == 0,
    Field1__c / Field2__c
Prathyusha JataproluPrathyusha Jataprolu 
Hi All,

We have a case queue of 'Compensation Cases'.  We have 'Private' sharing on Cases.
For Ex: If a Sales Ops person creates a Compensation case, it will be assigned to the finance team automatically.  The 'Case Creator' can not be able to view/edit the case created by him.  I think, I only have following options to share the case record with the Case Creator.
1) Create a sharing rules based on Case Created By ID and assign read/write rights to that user (create a public group with this user name).  I need to create lot of sharing rules and public groups in this case
2) I don't want to create a public group of the requested set of users as they don't want to view/edit other user cases.  

I think it can be done through development by creating manual sharing record with the case creator, whenever a compersation case is created.

Any suggestions/ideas can be helpful.  Thank you in advance for your time and help.

Thank you,
Best Answer chosen by Prathyusha Jataprolu
Dipin RajuDipin Raju
You should be able to do this now with Process Builder and a very simple Visual Flow.

1) Create a new visual flow (we have to start here so it's ready for the process we build in the next step).
  • Add a Record Create element to the canvas.
User-added image
  1. Enter the user ID of the person as you'd like assigned or CreatedById
  2. When you get here choose New Variable > enter CaseID as the name and make sure you choose Text and Input/Output.
  3. Enter the ID of the Member Role.
Make sure you click the little creen arrow on the Record Create element (you can see it in the upper left corner of the image above).

Save and activate.

2) Create a process builder with the following recipe:
  • Object = Case
  • Criteria 1:
  • No criteria—just execute the actions!
  • Immediate Action
  • Choose Flow
  • Name it and pick your newly created and activated flow.
  • Set the CaseID variable to a lookup (click the pencil to change it) and chose the Case Id from the dialogue.