Posts

Showing posts with the label Bell Notification

Bell Notifications in Salesforce

Image
Bell Notification is a feature that provides users with real-time updates and notifications about various activities and events happening within the Salesforce platform. It is represented by a bell icon in the Salesforce interface's top right corner. The bell icon displays a badge indicating the number of unread notifications when there are new notifications, such as mentions, comments, tasks, approvals, or any other relevant updates related to records or processes. Clicking on the bell opens a dropdown menu listing these notifications, allowing users to review and take action quickly. Bell Notifications help users stay informed and engaged with essential activities in their Salesforce org, ensuring timely responses and efficient collaboration. Users can customize their notification settings to receive alerts for specific events or activities according to their preferences and roles within the organization. Create a Custom Notification Detail View of Custom Notifications Fill in t...

Custom Notifications aka Bell Notifications from the Apex code.

Image
The Messaging.CustomNotification class allows you to create, configure, and send custom notifications using Apex code. Here is a basic outline of how you can create and send a custom notification from an Apex trigger: Create a Custom Notification Type : In the Setup, you should create a Custom Notification Type. This defines the type of notification you will be sending from Apex. Use CustomNotification Class : Once you set up your Custom Notification Type, you can craft your Apex code to create the notification. Here's an example code snippet: // Get the Id for our custom notification type CustomNotificationType notificationType = [SELECT Id, DeveloperName FROM CustomNotificationType WHERE DeveloperName='Lead_Due_Diligence_Completed']; Messaging.CustomNotification notification = new Messaging.CustomNotification();  notification.setTitle('Your Notification Title');  notification.setBody('This is the detail of the notification');  notification.setNotification...