Redirecting Users to a Newly Created Record from a Custom Toast Message in Salesforce (Spring '25)
Salesforce is continually improving the user experience, and one of the most exciting features introduced in the Spring ’25 release is the ability to redirect users to newly created records directly from a custom toast message. Previously, users had to rely on custom solutions like Lightning Web Components (LWC), Aura components, or Screen Flows to implement this functionality. But with Spring ’25, Salesforce has made it easier for developers and admins to achieve this behavior without the need for complex development.
In this blog post, we’ll walk through a common use case, explain the problem, and introduce the new solution provided by Salesforce in Spring '25 to simplify the process.
Use Case: Case Submission from an Account
Imagine a scenario where a customer wants to submit a case directly from an account page in Salesforce. After the case is successfully created, you would typically want to redirect the user to the newly created case record for further actions or updates. In the past, developers had to build a custom solution using LWC, Aura components, or even Screen Flows to accomplish this redirection.
Problem: The Traditional Way
To create a case record from an account page, Salesforce allows you to use Quick Actions. You can set up a custom button or action to create the case from the account page. However, when the case is created, there was no built-in way to automatically redirect the user to the newly created case record from the custom toast message.
Previously, the only way to achieve this redirection was through custom development, such as:
- Building a Lightning Web Component (LWC) or Aura Component to handle the creation of the case and redirection.
- Creating a Screen Flow to trigger the creation of the case and navigate the user to the new record.
This process was not only time-consuming but also added unnecessary complexity to the application, especially when a simpler solution could suffice.
Solution: Redirection from Custom Toast Message with Quick Action (Spring '25)
With Salesforce's Spring '25 release, you can now redirect users to a newly created record directly from a custom toast message after they submit a case using a Quick Action. This means no more custom code or development required for simple use cases where you need to create a record and navigate users to the record page.
Here's how it works:
- A Quick Action is used to create the case record from an Account page.
- After the record is created, a toast message is displayed to notify the user of the successful creation.
- The key improvement in Spring ’25 is that Salesforce automatically handles the redirection to the newly created record right from the toast notification—no need for custom LWC, Aura, or Screen Flows.
This feature drastically reduces the development effort and simplifies the user experience, making it easier to create cases and navigate users to the case record page in a smooth, seamless process.
How to Set Up Redirection Using Quick Action in Spring '25
- Create a Quick Action to Submit the Case:
- From the Account page, create a Quick Action to submit a new case. You can do this by using the "Create a Record" action or a custom Lightning component if you need advanced logic.
- Set Up a Toast Message:
- After the case is successfully created via the Quick Action, a toast message will appear by default, notifying the user of the successful case creation.
- Automatic Redirection:
- In Spring ’25, the redirect functionality is built into the Quick Action itself. Once the case is created, Salesforce automatically redirects the user to the newly created case record after the toast message appears.
- Test the Flow:
- To verify the redirection, create a test case from the Account page and ensure that after the toast message, you are redirected to the newly created case’s detail page.
FAQ: Frequently Asked Questions
Q1: Do I still need to create a custom component to enable this functionality?
No, with Salesforce Spring '25, you no longer need to create a custom component to redirect users to the newly created record. The redirection is now handled automatically by the Quick Action itself, simplifying the process.
Q2: Can I customize the toast message to include additional information, like a link to the new case?
Yes, Salesforce allows some customization of toast messages, but for redirecting to a newly created record, the redirection will happen automatically. You can still customize the message to provide additional context or details as needed.
Q3: Is this feature available for all objects or just specific ones like cases?
The ability to redirect to newly created records from a toast message applies to any standard or custom object that supports Quick Actions. For cases, it’s just one example, but this functionality can be leveraged across the platform.
Q4: What if I need more control over the redirection or toast message behavior?
If you need more control (such as adding buttons to the toast message or handling redirects conditionally), you may still need to use custom development (like LWC or Aura components). However, for most standard use cases, this new feature should suffice.
Q5: Does this work in Salesforce Classic?
No, this feature is only available in Salesforce Lightning Experience. It takes advantage of Lightning's Quick Actions and modern interface features.
Conclusion
Salesforce’s Spring '25 release brings a powerful new feature that simplifies redirecting users to a newly created record from a custom toast message. No more custom development is required for basic use cases like case submission from an account page. This update makes the process faster, more efficient, and easier for both users and admins. Whether you're managing customer support cases, new opportunities, or any other type of record creation, this feature can greatly improve the user experience.
Embrace this new feature today and streamline your Salesforce processes with minimal development effort!
Have you used the new redirection feature in Spring ’25? Let us know your thoughts and any feedback in the comments below!
