0

I'm currently working on a project where I need to implement a "maintenance" banner/message across our Salesforce Org. The requirement is to have this banner prominently displayed, particularly on Opportunity object pages. However, I would like to make it visible across the Org, similar to how Salesforce displays system-wide alerts, not just confined to a single feature or page.

Here are my specific requirements:

  1. Org-Wide Visibility: The maintenance message should be visible throughout the Salesforce Org, not just on specific pages or objects.

  2. Focus on Opportunity Pages: While the message needs to be Org-wide, it must be prominently displayed on all Opportunity object pages.

  3. Salesforce-Style Alerts: I like the way Salesforce itself communicates system statuses through alerts. I want the banner to have a similar look and feel, ensuring it's noticeable and conveys the message effectively.

I checked and found that I have to create a custom Lightning component, but I'm not sure what would be the most efficient and effective method to achieve this. It would be great if I could find a solution that can be implemented through configuration. I'm looking for guidance or suggestions on:

  • What would be the best approach to create such an Org-wide banner?
  • Are there any specific Salesforce features or tools that I should consider for implementing this?
  • How can I ensure the banner is consistently visible across all pages, especially Opportunity pages?

Any advice, code snippets, or pointing towards relevant resources would be greatly appreciated. Thanks in advance for your help!

5
  • As a matter of interest, why would you need such a banner? Downtime for true maintenance is rare and entirely outside your control. Commented Dec 15, 2023 at 20:02
  • @PhilW - It is required by another team who are working to migrate everything to a new org. Commented Dec 15, 2023 at 20:09
  • Just remove all write access from everyone and email all your users instead? Commented Dec 15, 2023 at 21:07
  • @PhilW - I got a less-than-optimal solution which I wasn't able to get to work. So, I'm going with an even worse option. Commented Dec 15, 2023 at 22:47
  • Implemented this - automationchampion.com/2022/07/10/… - but the banner doesn't show Commented Dec 15, 2023 at 22:47

2 Answers 2

1

You could use Lightning App Builder and drag across the RTF component into the relevant pages. In the RTF component you can type your message as well as displaying images. *Note this wont work on List View pages.

0

I tried the solution in this blog - https://automationchampion.com/2022/07/10/using-lightning-web-component-to-show-an-alert-banner/ - but I wasn't able to get it to work in time. Following is the overview of the solution.

  1. Create a custom metadata type to store the banner details
    1. Maintenance Start Date
    2. Maintenance End Date
    3. Message
  2. Create an Apex class to access custom metadata type record
  3. Create a lightning web component to show or hide an alert banner

The above is not the ideal solution I was looking for but it was better than nothing. Anyway, I wasn't able to get it to work.

On those lines, I had a bare minimum fallback option, that is, using just a rich text component for the duration of the downtime and then removing it once the other team was done.

Following are the steps to take to create the alert banner above the opportunity page.

  1. Login to Salesforce Go to "Setup"
  2. In the quick find search box on the left search for "Lightning App Builder"
  3. Click on "Lightning App Builder"
  4. Click on "O" from among the alphabet
  5. Click "Edit" against "Opportunity Record Page"
  6. In the Lightning App Builder, under the "Components" tab on the left-hand side, search for "Rick Text"
  7. Drag the "Rich Text" component and place it on the top of the page
  8. On the right-hand side, write your alert message in the text box.
  9. Apply the desired formatting and look at the preview.
  10. Once satisfied, click the "Save" button on the top right-hand side corner
  11. Close the "Lightning App Builder"

I shared this here for anyone searching for a similar solution. I won't be marking this answer as accepted in the hopes of someone posting a better solution.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.