if this the part of page, then follow below stpes instead of using <apex:slds /> :
step 1: go to https://www.lightningdesignsystem.com/downloads (https://www.lightningdesignsystem.com/downloads) and go to the 'Lightning Design System Static Resource' section and download the zip file.
step 2. upload zip file in static resource
step 3 use CSS style class file from static resource in your vf page using below statement :
The force:showToast event is a lightning component functionality. Although, you can embed lightning components into Visualforce, even then the force:showToast event doesn't work in Salesforce Classic.
In your scenario, you're probably better off writing your own toast logic.
It should be fairly straight forward:
Include the SLDS toast markup shown here: https://www.lightningdesignsystem.com/components/toast.
Include the slds-hide css class to hide the toast originally
Then you could use javascript or jquery similar to the following to show / hide the toast markup:
var $div2 = $("#YourToastMarkupClass");
$div2.toggleClass("slds-hide");
setTimeout(function() {
$div2.toggleClass("slds-hide");
}, 10000); //Set 10000 to however many milliseconds you want the toast displayed
By using the <apex:slds /> tag you can use lightning style classes in your VF page, custom toast code available here : https://www.lightningdesignsystem.com/components/toast/ you can show hide this toast msg by add or remove slds-hide and slds-show class on main DIV using javaScript output :
Let us know if it helps you, and kindly mark it best answer it this answer helps you so it make proper solution for others in future thanks
if this the part of page, then follow below stpes instead of using <apex:slds /> :
step 1: go to https://www.lightningdesignsystem.com/downloads (https://www.lightningdesignsystem.com/downloads) and go to the 'Lightning Design System Static Resource' section and download the zip file.
step 2. upload zip file in static resource
step 3 use CSS style class file from static resource in your vf page using below statement :
this is not possible beacuse your vf page is the part of standard page layout, this will show in scope of vf page layout, you can move this vf page on top of your page layout thanks
step 1: go to https://www.lightningdesignsystem.com/downloads (https://www.lightningdesignsystem.com/downloads) and go to the 'Lightning Design System Static Resource' section and download the zip file.
step 2. upload zip file in static resource
step 3 use CSS style class file from static resource in your vf page using below statement : now it's working as part of the page as well
Let us know if it helps you, and kindly mark it best answer it this answer helps you so it make proper solution for others in future
thanks
All Answers
The force:showToast event is a lightning component functionality. Although, you can embed lightning components into Visualforce, even then the force:showToast event doesn't work in Salesforce Classic.
In your scenario, you're probably better off writing your own toast logic.
It should be fairly straight forward:
Can you plese tell me. Step 1 and 2 shuld be done in the VF page?
By using the <apex:slds /> tag you can use lightning style classes in your VF page, custom toast code available here :
https://www.lightningdesignsystem.com/components/toast/
you can show hide this toast msg by add or remove slds-hide and slds-show class on main DIV using javaScript
output :
Let us know if it helps you, and kindly mark it best answer it this answer helps you so it make proper solution for others in future
thanks
my VF page is part of the record layout and it looks like this
It works on preview page, but as a part of page - no
step 1: go to https://www.lightningdesignsystem.com/downloads (https://www.lightningdesignsystem.com/downloads) and go to the 'Lightning Design System Static Resource' section and download the zip file.
step 2. upload zip file in static resource
step 3 use CSS style class file from static resource in your vf page using below statement : now it's working as part of the page as well
Let us know if it helps you, and kindly mark it best answer it this answer helps you so it make proper solution for others in future
thanks
thanks
Thank you!