Menu
subscribe our youtube channel popup

Redirecting to a Newly Created Record Using a Custom Toast Message – Spring’25

Salesforce has introduced a new capability that allows users to redirect to a newly created record using a custom toast message when creating records through quick actions. This enhancement improves the user experience by providing seamless navigation to the record just created beyond the default toast message functionality. Join us to learn about the Spring’25 feature Redirecting to a Newly Created Record Using a Custom Toast Message.

What Are Toast Messages in Salesforce?

Toast messages in Salesforce are lightweight, non-intrusive notifications that appear momentarily on the screen to inform users about the status of an action. These messages can convey success, error, warning, or informational messages. For example, when a user creates a new record using a quick action, Salesforce typically displays a default toast message confirming the record creation. However, with the new enhancement, users can:

  • Customize the toast message content.
  • Include a clickable link to redirect users directly to the newly created record.

This new functionality enriches the user experience and streamlines workflows by eliminating the need for users to manually search for the created record.

Benefits of Custom Toast Messages

  • Improved User Experience: Users can navigate the newly created record directly without additional clicks.
  • Flexibility: You can customize the toast message’s content.
  • Enhanced Efficiency: Reduces time spent searching for the created record.
  • Consistency: Provides a standardized and intuitive experience for users across different actions.

Implementation Example

Let’s create a quick action to add a new contact to an account and use a custom toast message to redirect users to the newly created contact record.

Steps to Create the Quick Action

  1. Navigate to Setup:
    1. Go to Setup in Salesforce.
    2. Navigate to Object Manager > Account > Buttons, Links, and Actions.
  2. Create the Quick Action:
    1. Click New Action.
    2. Select Action Type as “Create a Record”.
    3. Set the Target Object to “Contact”.
    4. Standard Label Type to New[Record]
    5. Name to “Test_New_Contact”.
    6. Success message to “You\’re amazing! The new contact has been created successfully.”
    7. Save the action.

Adding the Quick Action to the Page Layout

  1. Navigate to Object Manager > Account > Page Layouts.
  2. Edit the desired page layout.
  3. Drag the newly created quick action (e.g., “New Contact”) into the Mobile & Lightning Actions section. (Removed the existing “New Contact” quick action).
  4. Save the page layout.

Testing the Implementation

  • Navigate to an Account record where you added the quick action.
  • Click the New Contact button.
  • Fill out the required fields and save.
  • Observe the custom toast message that appears, containing a clickable link to the newly created contact record.

Note: The Toast message in the below screenshot is a default message, we can change or customize that as per this update.

Conclusion

Custom Toast messages with redirection provide a powerful way to enhance user interactions in Salesforce. By implementing this feature, you can:

  • Deliver a more intuitive and efficient user experience.
  • Align notifications with your organization’s branding and workflow requirements.

By following the steps outlined above, you can integrate this feature into your Salesforce org, empowering users with seamless navigation and improved efficiency. I hope this post on Redirecting to a Newly Created Record Using a Custom Toast Message will be helpful for you.

Satyam parasa
Satyam parasa

Satyam Parasa is a Salesforce and Mobile application developer. Passionate about learning new technologies, he is the founder of Flutterant.com, where he shares his knowledge and insights.

Articles: 40

Leave a Reply

Your email address will not be published. Required fields are marked *