0

My employer is beginning the process of switching over to a Salesforce org from our current Dynamics CRM 2015 on-prem solution. We have a situation in Dynamics where we would like to use setFormNotification() (a JavaScript function provided by Dynamics) to conditionally display a warning notification at the top of the page on certain Contact records, and I have been asked if this same type of function is available in Salesforce.

Does anyone know if Lightning Experience includes a similarly simple way to conditionally add custom persistent notifications at the top of a record page based on data in the record? Here is an example image from Dynamics:

example image of Dynamics persistent form notifications

6
  • 1
    I guess you can create a single component which takes a message and severity as design attribute and control its visibility based on conditions like field values, form factor, the user profile etc. help.salesforce.com/…
    – manjit5190
    Commented Jul 29, 2020 at 14:23
  • @manjit5190 Thanks for the quick comment! I've been working through trailhead content, but haven't learned much about Lightning Pages yet – can a custom component be added to a default lightning record page, or would I have to completely replace the object's default record page with a new custom lightning page in order to add a custom component?
    – kkwillmert
    Commented Jul 29, 2020 at 14:38
  • 1
    Yes, technically you are editing the default page which creates a new page that can be assigned as org default. See trailhead.salesforce.com/en/content/learn/modules/… and
    – manjit5190
    Commented Jul 29, 2020 at 14:41
  • I second this. Bonus: once you've created the component, you can use it on any page and have its conditions based on a point-and-click configuration, so you don't have to write code over and over again.
    – sfdcfox
    Commented Jul 29, 2020 at 14:58
  • Ok that makes sense. Seems like a pretty viable solution. Thanks, @manjit5190, this was very helpful!
    – kkwillmert
    Commented Jul 29, 2020 at 14:58

1 Answer 1

2

Adding comments as an answer:

You can create a single component which takes a message and severity as design attribute and control its visibility based on conditions like field values, form factor, the user profile etc. See here

Technically you are editing the default page which creates a new page that can be assigned as org default. See how you can do it here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .