-
How to show Toast message in Preview of Lightning Application in Salesforce?
I am using:
showToast : function(component, event) { var toastEvent = $A.get("e.force:showToast"); toastEvent.setParams({ message:'This account does not have any contacts.', }); toastEvent.fire(); }
but this gives me an error. How can I use this in preview?
Log In to reply.
Popular Salesforce Blogs
![](https://images.forcetalks.com/wp-content/uploads/2016/03/25085535/sa_1459409136Introduction%20of%20Lightning%20component%20framework.jpg)
Introduction of Lightning Component Framework
Lightning component framework is a UI framework to develop dynamic mobile and desktop app. This is the framework for building single page application. In this…
![](https://images.forcetalks.com/wp-content/uploads/2020/05/28085601/sa_1590656058ceptesblog4.jpg)
Making Shift from Salesforce Classic to Lightning – Must Needed Steps to Follow
Salesforce has rolled out its next-gen UI ‘Lightning‘ in 2014. The Lightning platform delivers reimagined user experience to enable fast & seamless app development. Enterprises…
![Salesforce Features](https://images.forcetalks.com/wp-content/uploads/2022/05/10150341/Salesforce-Features.jpg)
8 Best Salesforce Features For Sales Managers 2022
Salesforce Sales Cloud has the greatest customer base of any Sales CRM in the world. Salesforce has solidified CRM for high-performance sales companies by focusing…
Popular Salesforce Videos
How Salesforce AppExchange Can Boost Your Application's Marketing ?
Explore the key benefits of AppExchange, the largest business app marketplace, and discover how you can tap into its vast ecosystem of potential customers. In…
Salesforce Lightning Tutorial | Build a Custom Lightning Home Page
This Salesforce Lightning Tutorial video by Edureka will help you understand what exactly is Salesforce lightning. It will also talk about some of the features…
The Story of Salesforce. How Marc Benioff Built The Best CRM
This video, How It Happened explains the story of how Salesforce went from a small startup in San Francisco to become the leading CRM provider.…
Popular Salesforce Infographics
![Salesforce CPQ](https://images.forcetalks.com/wp-content/uploads/2022/01/05171929/Salesforce-CPQ.jpg)
Key Benefits Of Using Salesforce CPQ
Improves productivity and efficiency with Salesforce CPQ. Automate contract amendments, usage pricing, and renewals using an innovative billing feature of Salesforce CPQ Still have a…
![](https://images.forcetalks.com/wp-content/uploads/2018/02/25082850/sa_1517925958Salesforce%20Apex.jpg)
ABC's of Salesforce's Apex Coding Language
Apex is a proprietary language developed by Salesforce.com. It is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control…
![](https://images.forcetalks.com/wp-content/uploads/2024/05/20073708/sa_1716190614UnveilingEinsteinCopilotNavigatingtheFutureofAIAssistance.png)
Einstein in Action – Unleash the Power of AI in Salesforce
Drowning in data but thirsty for insights? Salesforce Einstein can be your life raft. This infographic dives into the world of AI for CRM, exploring…