Pages

Monday, November 23, 2020

Salesforce: Notification Builder

Salesforce offers an easy way to notify a user, such as a record owner, team members, etc. You do not need to wring a single line of code to build this (if you prefer); remember the admin motto "click-not-code").

The notification will appear in the Salesforce mobile app and Lightning experience (desktop web browser), but you can determine if you want the notification to appear in the Salesforce mobile app only, the Lightning experience only, or both.

Only a few steps for an admin to build the notification.

1. Create Custom Notifications

This is where we determine where the notification will show: mobile, desktop, or both. Navigate to the Setup menu and search for Salesforce Notifications.



From the Setup menu, search for Custom Notifications; you can create or edit existing notifications.


Once added, the new custom notification will be added and shown under Notification Delivery Settings.


2. Send Custom Notification from Process Builder

In addition to using Process Builder, the notification also can be sent from Flow Builder, Apex, and API.

In the Process Builder, from Action Type, select "Send Custom Notification".


Then, we can define who will be notified

Activate the Process once completed.


Here is a sample of notification in Lightning experience for Opportunity owner


Thursday, November 12, 2020

Salesforce: Controlling Record Access (Contact, Opportunity, Case)

In the previous blog, we discussed sharing record with sharing rules using Public Group & Role. In this blog, we will discuss the additional options to share records based on the object types.


Grant Access Using Hierarchies

In the Organization-Wide Defaults, we can see if Grant Access Using Hierarchies is enabled for each object. For Standard objects, this is enabled by default and cannot be disabled, while for custom objects, admin can enable/disable "Grant Access Using Hierarchies" for each object.

If Grant Access Using Hierarchies is enabled, users in the above role hierarchy will be able to access or edit the records (depend on the profile permission too).

sample: Maria Ann able to access the record, because she is assigned with the higher role hierarchy of the record owner Free Man

While if Grant Access Using Hierarchies is disabled, users in the above role hierarchy will not able to access the records of that object, unless it shared using other methods, such as sharing rules, or etc.


Access to Contact, Opportunity, and Case from Sharing Rule

Contact, Opportunity, and Case are standard objects for Sales/Service Cloud, but these 3 objects are special and different from other standard Salesforce objects, they are linked directly to Account, and admin able to configure access to records in these 3 objects based on the Account ownership.

When you create a sharing rule for Account, you will able to set Contact, Opportunity, and Case access too, so you can define Contact, Opportunity, and Case access from Account Sharing Rule.




Access to Contact, Opportunity, and Case from User Role

Each user ideally assigned with a role. In the role setting, there is an additional access setting for Contact, Opportunity, and Case. 

As the above screenshot, from Role setting in the role hierarchy, user may be able to view or edit Contact, Opportunity, and Case if the user owns the Account. This also includes users in the above role hierarchy of the record owner.