Write an Apex Action to Make Notifications Optional

After you add a checkbox to your user profiles, create custom Apex code to create a notification setting for your buyer users.

  1. From Setup, in the Quick Find Box, enter Custom Code, and select Apex Classes.

  2. Click New.

  3. Copy this code sample or write your own.

Here’s an example Apex class.