Ask Search:
Mindy NewtonMindy Newton 
With Summer 19 release over the weekend, now when users click on a contact's email address, outlook doesn't open. Works in Classic - not in Lightning.  Worked for us on Friday prior to the release.  Email to Salesforce is enabled.
Best Answer chosen by Mindy Newton
Pattie HeintzPattie Heintz
Hey Mindy, there is a new feature for personal email settings in Lightning.  In Lightning, click your Profile picture on the top right and select Settings.
Go to "My Email Settings" and there are two options now:
"When you click an email address to compose an email, which email editor do you want to use?"
You will want to change it to open with the Default Email Application instead of the Salesforce email composer.
User-added image


The issue is because salesforce released this setting and defaulted everyone to "Salesforce Email Composer".

As far as I know, they still have not provided an option for admins to change other users preferences en masse, however you and your users could change the setting over manually so they can at least get work done.
Evan PonterEvan Ponter 
I've figured out a workaround for those interested in grouping report results by a date field and want to count the number of "groups" between the highest date value and the lowest date value, inclusive. This also includes any groupings in between those date values that aren't showing any records (desirable in some situations, not all. Just something to be aware of). While this isn't truly counting "the number of groups that you see in your report", it does work for a lot of situations where you have sequential groups of dates with data - e.g. records with January, February, and March dates on them and your report time frame is set to only show January, February, and March.

I will point out that Salesforce might be developing something to address this natively (https://www.salesforce.com/blog/2019/02/ideaexchange-formulas-dates.html). They mention that:
[The] team paired the two ideas together when scoping the feature, which helps report users organize and summarize data to answer questions such as:
  • When was the last time we contacted a customer?
  • How long, from the project start date, did it take to close an opportunity?
  • What’s the average number of records created within a given timespan?
The article goes on to say:
The initial beta functionality for the Summer ‘19 release will allow comparisons via date/time functions, and is currently in development for the Lightning Experience. Additional functions will be supported upon the general availability of the feature, planned for the Winter ‘20 release.

Which sounds like we should cross our fingers for a Winter '20 release. Until then, try this out:

You will need to create a formula field to correspond with the time frame for your group (see #1 below). This formula field assigns a number sequence to the record based on the date field. The starting number and actual values are arbitrary - this just needs to be a sequential series of numbers that are consistent for all records on the object so that you can calculate a difference between two records.

1. Create a formula field on the object in question.
Formula Field

Use the "number" data type with no decimal places.
Number Formula Options

Anything surrounded by brackets [ ] (including the brackets) needs to be replaced with your value.

- - - 1a. For fiscal year groupings, name the field "Fiscal Year of [date field name]" and use this formula. I'm using a fiscal-year-ending model here. You may want to use fiscal-year-beginning if your organization does so that there's no confusion (see below the code snippit), but it really doesn't matter since we are interested in the difference between two records. Also, I recommend storing your fiscal year start month and start day in custom settings so you don't hardcode those values here:
YEAR([date_field_API_name])
+
IF(
    MONTH([date_field_API_name]) > [Fiscal Year Start Month]
    ||
    (
        MONTH([date_field_API_name]) = [Fiscal Year Start Month]
        &&
        DAY([date_field_API_name]) >= [Fiscal Year Start Day]
    ),
    1,
/*ELSE*/
    0
)
For Fiscal Year Beginning, swap the plus sign for a minus sign on line 2, then swap the 1 and 0 on lines 10 and 12

- - - 1b. For calendar year groupings, name the field "Year of [date field name]" and use this formula:
YEAR([date_field_API_name])

- - - 1c. For calendar quarter groupings, name the field "Sequenced Quarter of [date field name]" and use this formula (works for fiscal quarters too as long as your fiscal months start on Jan 1, Apr 1, Jul 1, and Oct 1 - e.g. your fiscal year starts on Apr 1 and you have 3-month quarters resulting in fiscal months starting on Apr 1, Jul 1, Oct 1, and Jan 1):
IF(!ISBLANK([date_field_API_name]),
    CEILING(MONTH([date_field_API_name]) / 3)
    +
    4 * YEAR([date_field_API_name]),
/*ELSE*/
    NULL
)

- - - 1d. For calendar month groupings, name the field "Sequenced Month of [date field name]" and use this formula (works for fiscal months too as long as your fiscal months start on the 1st of each calendar month - e.g. Apr 1, May 1, Jun 1, etc):
IF(!ISBLANK([date_field_API_name]),
    MONTH([date_field_API_name])
    +
    12 * YEAR([date_field_API_name]),
/*ELSE*/
    NULL
)

- - - 1e. For calendar week groupings, name the field "Sequenced Week of [date field name]" and use this formula. This is for Sunday - Saturday weeks. To change which day of the week you want to start on, see below code snippit. I chose January 1, 1905 as my magic date because it's the beginning of a year pretty far in the past that falls on a Sunday. Even if your date value is before January 1, 1905, the calculations will still work since we are only concerned with the difference between two records:
IF(!ISBLANK([date_field_API_name]),
    FLOOR(([date_field_API_name] - DATE(1905,1,1)) / 7,
/*ELSE*/
    NULL
)
To start the week on Monday, replace line 2 with:
FLOOR(([date_field_API_name] - DATE(1905,1,2)) / 7,

To start the week on Tuesday, replace line 2 with:
FLOOR(([date_field_API_name] - DATE(1905,1,3)) / 7,

To start the week on Wednesday, replace line 2 with:
FLOOR(([date_field_API_name] - DATE(1905,1,4)) / 7,

To start the week on Thursday, replace line 2 with:
FLOOR(([date_field_API_name] - DATE(1905,1,5)) / 7,

To start the week on Friday, replace line 2 with:
FLOOR(([date_field_API_name] - DATE(1905,1,6)) / 7,

To start the week on Saturday, replace line 2 with:
FLOOR(([date_field_API_name] - DATE(1905,1,7)) / 7,

- - - 1f. For daily groupings, name the field "Sequenced Day of [date field name]" and use this formula:
[date_field_API_name] - DATE(1905,1,1)


2. In your report, create a custom summary formula.
To calculate the date groupings between the highest date and lowest date, specify the MAX of your formula field from #1 above, then subtract the MIN of your formula field from #1 above, then add 1 (since we want to count both the first and last group, not just what's in between).
[YourObjectHere].[YourNewSequenceFieldHere]:MAX
-
[YourObjectHere].[YourNewSequenceFieldHere]:MIN
+
1
Here's my example - I want to know how many "week" groups are in my report (Just for demo purposes to prove this method is calculating the right number):
Custom Summary Formula Counting Weeks
(this can be displayed at all levels or only at the grand total level)

Here's what it calculates when you run the report:
Report Showing Number of Weeks

Then here's a formula to calculate Average Number of Records per Week:
RowCount
/
(
    [YourObjectHere].[YourNewSequenceFieldHere]:MAX
    -
    [YourObjectHere].[YourNewSequenceFieldHere]:MIN
    +
    1
)
Display this at the grand total grouping only. You should see an accurate average calculation that takes into account how many date groupings you have in your report. Here's what mine looks like:
Average Records per Week

Hope this helps anyone out there trying to calculate something similar in their reports. Comment below with suggestions for improvement, or to celebrate when Salesforce builds this in natively.

Shout out to SteveMo for suggesting I post this. Also his tweet (https://twitter.com/SteveMoForce/status/1130904510833090560) was my motivation to buckling down on this endeavor
Best Answer chosen by Evan Ponter
Evan PonterEvan Ponter
Couple of improvements since I wrote this. Here are revised formulas for step 1. PLUS a few bonuses...


1a "Fiscal Year of [date field name]"
For consistency, this should only resolve to a value if there is a date in your date field.

I'm using a fiscal-year-ending model here. You may want to use fiscal-year-beginning if your organization does so that there's no confusion (see below the code snippit), but it really doesn't matter since we are interested in the difference between two records. Also, I recommend storing your fiscal year start month and start day in custom settings so you don't hardcode those values here:
IF(!ISBLANK([date_field_API_name]),
    YEAR([date_field_API_name])
    +
    IF(
        MONTH([date_field_API_name]) > [Fiscal Year Start Month]
        ||
        (
            MONTH([date_field_API_name]) = [Fiscal Year Start Month] 
            &&
            DAY([date_field_API_name]) >= [Fiscal Year Start Day]
        ),
        1,
    /*ELSE*/
        0
    ),
/*ELSE*/
    NULL
)
For Fiscal Year Beginning use:
IF(!ISBLANK([date_field_API_name]),
    YEAR([date_field_API_name])
    -
    IF(
        MONTH([date_field_API_name]) > [Fiscal Year Start Month]
        ||
        (
            MONTH([date_field_API_name]) = [Fiscal Year Start Month] 
            &&
            DAY([date_field_API_name]) >= [Fiscal Year Start Day]
        ),
        0,
    /*ELSE*/
        1
    ),
/*ELSE*/
    NULL
)


1b "Year of [date field name]"
For consistency, this should only resolve to a value if there is a date in your date field.
IF(!ISBLANK([date_field_API_name]),
    YEAR([date_field_API_name]),
/*ELSE*/
    NULL
)


1c. "Sequenced Quarter of [date field name]"
No changes needed. Same description from above:

For calendar quarter groupings, name the field "Sequenced Quarter of [date field name]" and use this formula (works for fiscal quarters too as long as your fiscal months start on Jan 1, Apr 1, Jul 1, and Oct 1 - e.g. your fiscal year starts on Apr 1 and you have 3-month quarters resulting in fiscal months starting on Apr 1, Jul 1, Oct 1, and Jan 1):
IF(!ISBLANK([date_field_API_name]),
    CEILING(MONTH([date_field_API_name]) / 3)
    +
    4 * YEAR([date_field_API_name]),
/*ELSE*/
    NULL
)


1d. "Sequenced Month of [date field name]"
No changes needed. Same description from above:

For calendar month groupings, name the field "Sequenced Month of [date field name]" and use this formula (works for fiscal months too as long as your fiscal months start on the 1st of each calendar month - e.g. Apr 1, May 1, Jun 1, etc):
IF(!ISBLANK([date_field_API_name]),
    MONTH([date_field_API_name])
    +
    12 * YEAR([date_field_API_name]),
/*ELSE*/
    NULL
)


1e "Sequenced Week of [date field name]"
This should really be using the MFLOOR function to handle dates before January 1, 1905. Plus my original post was missing a parenthesis on line 2 (oops!!). Use this instead for a Sunday - Saturday week:
IF(!ISBLANK([date_field_API_name]),
    MFLOOR(([date_field_API_name] - DATE(1905,1,1)) / 7),
/*ELSE*/
    NULL
)
Here's line 2 for a Monday - Sunday week:
MFLOOR(([date_field_API_name] - DATE(1905,1,2)) / 7),
Here's line 2 for a Tuesday - Monday week:
MFLOOR(([date_field_API_name] - DATE(1905,1,3)) / 7),
Here's line 2 for a Wednesday - Tuesday week:
MFLOOR(([date_field_API_name] - DATE(1905,1,4)) / 7),
Here's line 2 for a Thursday - Wednesday week:
MFLOOR(([date_field_API_name] - DATE(1905,1,5)) / 7),
Here's line 2 for a Friday - Thursday week:
MFLOOR(([date_field_API_name] - DATE(1905,1,6)) / 7),
Here's line 2 for a Saturday - Friday week:
MFLOOR(([date_field_API_name] - DATE(1905,1,7)) / 7),


1f "Sequenced Day of [date field name]"
For consistency, this should only resolve to a value if there is a date in your date field.
IF(!ISBLANK([date_field_API_name]),
    [date_field_API_name] - DATE(1905,1,1),
/*ELSE*/
    NULL
)


AND NOW INTRODUCING...
1g "Sequenced Business Day of [date field name]"

That's right, claiming the 1g spot is the "Sequenced Business Day of [date field name]" field. This will allow you to count the number of Business Days (Monday - Friday) in your report. You are still creating a number field with no decimal places, and you'd use this formula:
IF(!ISBLANK([date field name]) && WEEKDAY([date field name]) > 1 && WEEKDAY([date field name]) < 7,
    (MFLOOR(([date field name] - DATE(1905,1,1)) / 7) * 5)
    +
    WEEKDAY([date field name]),
/*ELSE*/
    NULL
)
Saturdays and Sundays will evaluate to a null value - which means they will be ignored completely even if they appear in your report. The weekdays will each be numbered in sequence. I checked this one for syntax, dates before 1/1/1905, etc so it should be an easy copy-and-paste for you. Then follow step 2 from the original post to create the custom summary formula in your report.


BONUS TIP 1:
You don't need to group your report results by the timeframe you are averaging. Confused? Here's my example. I am calculating the average number of records per week and I want to know that "weekly average" for a time frame spanning the whole fiscal year. I don't need to group my report results by week, only by fiscal year. The custom summary formula will take care of calculating the correct averge for each fiscal year, and the overall time frame in the total column
Average Per Week for Fiscal Years


BONUS TIP 2:
When using multiple groupings, you can use the custom summary formula as-is to find the difference between the maximum and minimum dates in each grouping, or use the PARENTGROUPVAL function to get the maximum and minimum dates from a higher grouping. This allows you to factor in the entire timeframe regardless of the data present in each grouping.

This example is for a report with row and column groupings (formerly known as a Matrix Report). This will need to be displayed at a grouping level (in my case Hostel/Community for the row and Start Date for the column).
RowCount
/
(
    PARENTGROUPVAL([YourObjectHere].[YourNewSequenceFieldHere]:MAX, ROW_GRAND_SUMMARY, [YourColumnGroupingFieldHere])
    -
    PARENTGROUPVAL([YourObjectHere].[YourNewSequenceFieldHere]:MIN, ROW_GRAND_SUMMARY, [YourColumnGroupingFieldHere])
    +
    1
)

There have been 9 weeks in FY 2020. Austin had a record each week, their average per week is 1. Nice.
Eastham had a record in each of the first 3 weeks, but none after that. The calculation for Eastham uses 3 as the numerator (the number of records for that group) and 9 as the demoninator (which is taken from the row grand summary for that column) and results in 0.33. For the completed years, each hostel is getting an average calculated based on a 52-week year regardless of having records in the first and last (or any) week of that year.
Average per Week for Entire Time Frame
Dee SriDee Sri 
Hello,

I noticed that we cannot mass insert opportunities to a specific campaign like we can do for Leads/ contacts through the Data loader. 

Is there a way to mass add Opportunities to a campaign through the data loader or any tool ?

Thank you.
Best Answer chosen by Dee Sri
Brendan ConroyBrendan Conroy
Hi Dee,

If you do a mass update on those Opportunities, there is a field called Primary Campaign Source. That is what ties the Opp to the Campaign. Once you have that data in Primary Campaign Source, the rollups on the Campaign should populate with that new Opp data. I hope that helps. 
Corey BakerCorey Baker 
Hello Kind Folks,

I'm bashing my head against a Partner Community limitation on Lead conversion with existing Accounts.

Specifically, to convert a Lead to an existing Account, one must own or have write access to the Account. But of course, we can't let any one partner own an Account, and we sure as hell can't open up write access to all of our Accounts to the wild wooly world.

The net is that Partners either have to let an insider convert for them, or the Partner creates a dupe Account during Lead conversion. (We have lots of Leads converting into existing Accounts)

I'm secretly hoping that I am misunderstanding the limitations on conversions. How do you all prevent these Account dupes from Partner Community Lead conversions?
Best Answer chosen by Corey Baker
sakshi nagpalsakshi nagpal
Hi Corey,

 Unfortunately, you are right, there is an idea for this-:
https://success.salesforce.com/ideaView?id=08730000000Bpw7

 I have a suggestion if you use custom lead conversion then you will be able to overcome this issue , create a custom lead conversion button. On click of button  call apex class for lead conversion.If you use this cusom functionalityfor lead conversion, user will not require create permission on Account.

Let me know if it was helpful!
Jack SteinerJack Steiner 

I am experimenting with Flow builder and manipulating Opportunity Line Items (aka. Products). I am trying to see if it is possible to create a number of records of a custom object type based on the products attached to an opportunity.

Getting the line item records and storing them in a variable is fairly straightforward. However, I assume I need a Loop to go through each one and create the new corresponding record. My issue is that the Loop uses a variable to store the individual item its working on at a given time, and it seems to restrict me from using a variable not of the same object type. Does anyone know how to bridge this gap?

I hope I've used the terminology correctly. I can clarify, if needed.

Best Answer chosen by Jack Steiner
Om PrakashOm Prakash
Hi,
We need to play with Loop and Asignment here.

You might already have two variable for Opportunity Line Items in flow currently:
For example, varOppLineItem and lstOppLineItems

Please create two variable resource for your Custom Object.
1. varCustomRecord for Individual record
2. lstCustomRecords for Collection of records

In Loop element you might already asigned OpportunityLineItem to a individual record variable varOppLineItem.
User-added image

Now add an Assignment Element, and map the all variables of your Custom object from Opportunity line item's variable.
User-added image

Add another Assignment element to hold all individual record of custom object in collection variables
User-added image

Now "Create Records" element which will simply create records from collection variable
User-added image


Linking will look like bellow:
User-added image

It should work as expectd.

If any query feel free to ask.
 
Lauren FurmanskiLauren Furmanski 
What happens to the prospects associated with the old form when you delete it?

Do you need to place them on a static list before deleting or will they still remain in the system once the form is deleted? 
Best Answer chosen by Lauren Furmanski
Srinivasa RayapuriSrinivasa Rayapuri
Hi Lauren

Forms are the way you capture prospects and once created they remain in the system. You can delete all the old forms and not prospects.

I recommend you have a backup of all the prospects just incase/
Jennifer GabrielJennifer Gabriel 
I need to be able to add product lead times (in business days) to an opportunity expected close date to determine the product shipping date. I have seen formulas for calculating number of business days between two dates, but I need the opposite. Does anyone have something they can share with me so I don't have to try to reverse engineer the between 2 dates formula? Thanks!
Best Answer chosen by Jennifer Gabriel
Amit SinghAmit Singh
Here you GO :)
https://salesforce.stackexchange.com/questions/91880/date-formula-to-calculate-date-excluding-weekends (https://salesforce.stackexchange.com/questions/91880/date-formula-to-calculate-date-excluding-weekends" target="_blank)
https://force-base.com/2016/11/05/how-to-add-business-days-to-a-date-in-salesforce-formula/ (https://force-base.com/2016/11/05/how-to-add-business-days-to-a-date-in-salesforce-formula/" target="_blank)
Mike WrightMike Wright 
Here's the thing.  I thought SF, given its' cost, was the premier CRM out there.

I have used quite a few, none with such complexity and, apparent lack of features, like SF.
  1. Tasks with only date and no time - not able to show in calendar of set alerts for them.
  2. Email alerts that are documented but don't look, on my new enterprise setup, remotely like any of the articles I have read - almost impossible to decipher or setup.
I guess I will have to struggle along.  However, even, open spurce apps like Zurmo manage basic stuff like those above.


 
Best Answer chosen by Mike Wright
Christine MarshallChristine Marshall
Hi Mike! 

No need for an extra field :)

Navigate back to your email template. Replace {!Event.StartDateTime} with {!DATETIMEVALUE(Event.StartDateTime)} . This will give your recipient the date and time in the email alert. 

Anther useful field you can put in email templates is the 'detail link' -  {!Event.Link}. This will give the recipient a link that when clicked on will take the user to the event in Salesforce. 
Rodney GrayRodney Gray 
We are needing to develop a report that, for a given date range, displays the Stage History of all opportunities.  We're not looking for a report that only shows current stage and immediately previous stage, but all changes reflected on an opportunity as outlined in the "Stage History" section of that opportunity.

Has anyone done this before?  I have reviewed the various opportunity reports available and can not see Stage History anywhere as a field I can select.  I have looked into custom report types and again, can not find the field available.  Clearly, it's being recorded on the opportunity, so surely there is a way to get this information back out of the system collectively on a report for all opportunities in that given date range.
Best Answer chosen by Moderator (salesforce.com) 
Steve MolisSteve Molis
Select an Opportunity History report as the Report Type and then select  Stage Change  [equals]  TRUE  
in the Report Filters, that should give you what you're looking for.  

Carey FairlieCarey Fairlie 
Does anyone know how to redirect a Pardot landing page (info.domain) to a Wordpress landing page (on our company's domain)? 
Best Answer chosen by Carey Fairlie
Craig HattonCraig Hatton
YES!

So you can do this with Javascript.

Copy and paste the below script into the head of the layout template of the Landing page you want to redirect.

Be sure to make sure this template isn't being used elsewhere.
<script>
window.location.href = "your preferred location";
</script>

Also, you could copy the HTML from wordpress and paste it into the Pardot Layout Template. (Probably a better option to be honest)

Craig