0

In our Org, we allow Partner Community members to create and own Opportunities. As the administrator, I would like to receive an email alert only when Partner Community members create an Opportunity, not when In-House users create an Opportunity.

The reason for this is that I need to ensure that the new Opportunities are being assigned to the appropriate person.

I have created an email alert and assigned it to a workflow rule, but the email is being sent even when the Opportunity is created in-house.

3
  • 1
    use criteria where $Profile.Name = 'thePartnerCommunityProfileName` – cropredy Jun 25 '20 at 0:14
  • @cropedy, Thank you. Your answer worked for me...but in reverse. Because our business model has more profiles which may have reason to create opportunities than thoes who should not, i set the criteria to exclude only "House" profiles. Now I only receive the alert when some creates an opportunity who does 'not' have a profile equal to "House". Outstanding! – Martial Aug 25 '20 at 5:00
  • you might want to accept the answer as a service to the Community – cropredy Sep 3 '20 at 19:48
0

Workflow rules (and for that matter, Process Builders, Lightning Flows, Visualforce Pages, Formulas, and Validation Rules) have access to certain runtime variables about the current user:

$User.xxx     // properties of the current user like $User.Email
$Profile.xxx  // properties of the current user's profile like $Profile.Name
$UserRole.xxx // properties of the current user's role like $UserRole.Name
$MyCustomPermission // presence of a custom permission held by current user
$Setup.XXX.field__c // value of hierarchical setting XXX's field__c 

The available values of xxx can be found in the UI's formula editor. For Workflows, Salesforce also surfaces the $User, $Profile, and $UserRole in the Current User: xxx dropdown in the rule editor.

So, in your example, the WFR criteria would be:

$Profile.Name <> 'House'

or

 Current User: Profile not equal House

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.