Ask Search:
Staci RiceStaci Rice 
Can someone help me create a formula that will calculate the # of days since a user took ownership of a record?

Basically I need to know when someone took ownership of  a Lead and how many days they've owned it.  When it reaches 30 days and the status is still 'Not Contacted" I want to reassign ownership to the Lead Queue.

Best Answer chosen by Moderator ( 
Andres GluecksmannAndres Gluecksmann
1. Create a new Date field called "Ownership Changed"
2. Create a Workflow rule to evaluate the Lead Owner field with an "ISCHANGED" function - if True then the WFrule fires an update to the "Ownership Changed" field to stamp it with TODAY()
3. Create another formula field (Called "Days Since Last Owner Change") that basically calculates "Today - Ownership Changed" (date - date = # of days different). 

That will take care of your requirement to see the number of days lapsed since your last owner change. You can then report/filter on that formula field to create interesting exception reports.

What's interesting is that you don't really need all of that to get the ownership to flip back to a queue.

What you need for that is just the "Owner Changed" Date.

You build a Workflow Rule that evaluates this "Owner Changed" Date not being NULL AND Status = Not Contacted. That will fire your rule but - of course you couple it with a Time Based action that will queue the Field Update action (for the Owner Update) 30 days after Rule Trigger. 

As long as the criteria that cause this to fire is true the queued action will persist and/or the "fire date" will change if the Lead Ownership changes but the status remains "Not Contacted". Since you set your time based workflow to trigger on "Owner Changed" date that will take care of the corner case of some new rep taking the Lead over and - reseting the clock to 30 more days (as would be expected for a new owner right?). 

Keep in mind this all assumes calendar days - not business days. If you want to make this work off of business days you'll need to get fancier.

Hope this helps!

Loredana SimionLoredana Simion 
Hi there! 

I'm having this issue with one user and I can't get to solve it. She is creating a case within an account and after saving it, the case doesn't appear within the account:

I have to mention that the case owner is NOT the Account owner but she is within the "account team" so she should edit and create records within the account.

User-added image

After cliking the save button the case it is "created" but it doesn't appear within the account. 
User-added image

If we go to the cases object we can find the cases created but there is no account associated with them:
User-added image

I will really appreciate your help. I'm new to salesforce and not sure how to handle this.

Thank you so much
Best Answer chosen by Loredana Simion
Pritam ShekhawatPritam Shekhawat
You can modify the Account access for that user by going to Account team related list and give Account read/write permission. 
User-added image
Paul HickenPaul Hicken 

I came across an interesting issue with the new ability to deploy a community via change sets that came with the Summer '17 update.  I've figured out the resolution as well, which I'll post as an answer to the question, but I wanted to post it here incase it may help others.

I had a Sandbox set up, and created a test community in that sandbox which grew into the actually community we were going to migrate into Production as a brand new community. We hadn't figured out a name for it yet, but by the time it was ready for migration to production we had finalized the name for it and renamed the Community from the placeholder name to the finalized name (we'll come back to why this is important in the answer).

I then followed the steps outlined here and created a brand new community in Production with the finalized name we had decided on:

Then I made an outbound changeset in the sandbox, selected the Network object for the community and then added the two dependancies.

I uploaded the changeset to production, and then when I went to deploy the changeset I recieved the following error:

"An unknown exception has occured."
Community deployment exception

Not super useful, and searching Salesforce success, help, and googling in general yeilded no results, which made sense since this is such a new feature.

So what could be causing this error?

Best Answer chosen by Paul Hicken
Paul HickenPaul Hicken
It turns out that the issue is caused by the renaming of the Community and you'll run into this error in two scenarios:
  1. If you rename a Community to it's final name in the sandbox but the Community you created in Production the final name from it's creation point. 
  2. If you have the correct final name for the Community in the sandbox right from it's creation point, but perhaps when creating the Production Community, you mistyped the name so then you go ahead and rename it to match.

Let's say for example you have a Community named "Temp Community Name".

When you make a changeset for a Community and add the Network component you'll see the APIName "Temp_Community_Name", and then when you add the dependancies you'll see 2 components with APINames "Temp_Community_Name" and "Temp_Community_Name1" respectively.

If you go and rename that Community to "Final Community Name" and make a change set and add the dependancies you'll get a Network with the APIName "Final_Community_Name" and 2 components with APINames of "Final_Community_Name" and "Final_Community_Name_C"

So when renaming a Community, the APIName of the 2nd component changes the "1" at the end to "_C".  

Then if you create a brand new Community in Production and name it "Final Community Name", in the backend it's APIName is "Final_Community_Name1", so when you try and deploy the changeset from the Sandbox to Production, it gives you the unknown exception error because it's trying to match up the component "Final_Community_Name_C" from the Sandbox into "Final_Community_Name1" in Production and fails.

The reverse of this is true as well, as stated above, if you never rename the Community in the sandbox, so it has "1" at the end, but for some reason you have renamed the Community in Production so that it will match the name in Sandbox, it will now have "_C" at the end and the same failure will occure.

The solution to this is that if you see "_C" in your changeset for that second component that means you've renamed your Community at somepoint, so go and rename your Production Community to something else, and then rename it back so that it still matches your Sandbox Community. This will change the APIName of the Production second component to have the "_C" so that it will now match what is in your Sandbox and you will be able to deploy successfully!
Chris OwenChris Owen 
Is it possible to search for duplicate Leads by the postcode?
Best Answer chosen by Chris Owen
Pritam ShekhawatPritam Shekhawat
No, you can search based on postcode using the standard duplicate lead button. When you hit the "Find Duplicates" button on the lead record, you have an option to check the following options:
Name, Last Name, Company, Email, Domain, and Phone.   

You can look for an appexchange app for this.
Mark KeaneMark Keane 
I've created a Custom Object called Apps and I have a Lookup field linked to Opportunity to select Opportunity. Name.
I now want a second field that will be populated with Opportunity.Fabricator field based on the Opportunity I select. From looking at other objects in my Org, I'm using a Formula field to do this - basically the formula is Opportunity.Fabricator but the syntax failed based on Opportunity field not recognised.

Where am I going wrong or how can I achieve this ?

Thanks in advance,
Best Answer chosen by Mark Keane
Puneet MehtaPuneet Mehta
Hi Mark,

Make sure you are using the correct API name of the field.

Use the advanced formula tab to select the field.

User-added image
Kimberly WargoKimberly Wargo 
Good Morning all,
I do not know nor write triggers.. Several were written before I came on as the Admin.
I have a Trigger that is designed to change the record type on Accounts after our daily bulk import.
I have recently gotten several "fails" and was hoping someone could tell me why.
And is there an easier way (workflow) to write this than a trigger?
My fail is at Row 28 / Column 1
User-added image

Best Answer chosen by Kimberly Wargo
Jeff MayJeff May

Hey Kim -

When you do an upsert, the match will be done on the Salesforce record ID or a custom field marked as an 'external Id'.

From the Process perspective, it won't matter which record since the Process will be looking at whatever record gets created or changed and then seeing if that meets the criteria.

A suggestion:  before you start actually changing anything, make sure you map out each piece of the current solution, what it does, and how it passes data to the next piece.  Then, map out what you plan to build and make sure the "what it does" and "how it passes" match.  Also, it can't hurt to build this in a sandbox and test it with a few records.

Kersty ZahnKersty Zahn 
The line spacing between all picklists including page view lists have changed from single spacing to 1.5, but only for certain profiles.  Any ideas where this setting is?

Previously my lists looked like:

User-added image

Today my list displays as: 

User-added image
Best Answer chosen by Miglena ( 
Gerry SyjongtianGerry Syjongtian
This is a known issue on that version of chrome on windows I read it. You may need to ask your IT support to downgrade to version 58. Cheers!
Chuck HarpkeChuck Harpke 
I am looking to back up Libraries in one of my Sandboxes.  I'm assuming DataExport doesn't work for this.   Do I have any other options?
Best Answer chosen by Chuck Harpke
Junaid KhaderJunaid Khader
Hi Chuck,
You can use SublimeText Editor and link it to salesforce using mavensmate. You can easily export all data to your local machine.
Liz GibbonsLiz Gibbons 

I have created a flow to sign people in at our community center. If they have been to the center before, they can look themselves up using email or phone number. The phone number lookup is causing issues. The people signing in are entering their phone numbers in a string, e.g. 2155551212, but if our employees input the phone numbers, then the field automatically re-formats the number to (215)555-1212 or 215-555-1212. 

I have only been able to come up with a lookup that looks up one of the formats, not all of them. Is it possible to make the lookup format agnostic? If so, how do I go about doing this?
Best Answer chosen by Liz Gibbons
Deepak AnandDeepak Anand
You'll have to create a Formula Field that "nomalizes" the Phone Field - 
    ' ',

Getting rid of all the punctuations! You'll have to do this in the Flow too(I mean in the Screen Input Field) and then compare the Formula Field and the normalized Screen Input Field together.
Best Answer chosen by Carolyn Hillyard
Jason ThurgoodJason Thurgood

I suspected this was a loaded question ;)

This is just a wee bit more complex.  Assuming you are on Enterprise Edition or greater, you could implement something like this: 

Step 1: Create a custom User Lookup field on Contact
Step 2: You will need an Apex Trigger on Campaign Member or Campaign (depending on your need) that would update the user records associated to the Campaign Members (Contacts) with the Date the Agent was trained.  You may need multiple date fields on the user record if there are multiple Dates / Trainings.  

Step 3: Then on your Opportunity Object you can create a formula field to indicate if the opportunity was created or closed before or after the Date the Agent was Trained.  The Opporutnity Formula would look something like this: 

IF( CreatedDate > Owner.Date_Trained__c, "Post Training",
IF( CreatedDate < Owner.Date_Trained__c, "Prior to Training", "Prior to Training"

Then on your reports you can run Opportunity reports and group Opps for specific users by the new Formula field you created above. 

There are probably other ways to do this, and ideally much more thought should go into this.  But I cannot think of a way to systematically bridge the gap between Users and Campaign Members without code.  

You could however, manually update User records with the Dates they were training (that would remove the code requirement), and just use the formula field to group your analytics.