Custom Setting & Custom Metadata Cheatsheet

 Recently I took an interview for a Salesforce Developer and I asked the below question.

    Q: What is the difference between custom setting and custom metadata?

Most of them mentioned it a deployable apart from that no other answer so, I decided to list out the difference here.


I hope this will be helpful. Please let me know your thoughts.





Logout Link on Lightning Community

Currently I am working on the community implementation and I come accross the scenario where I need to place a logout link on the community page. On google most of them mention to redirect logout.jsp page. When I use this logout.jsp page it is just redirecting to the logout page without clearing the session. Then I started going through the salesforce documentation and came across the below Lightning Web Component(LWC) for the logout link.

LogoutPage.js 


This code will clear the session and redirect to the community login screen. To make this code work 100% in your community then you have to follow the below steps. 

 1. Your community should not be a public facing. 
 2. On the community setting Login and Logout pages should be set as default pages. 

I hope this will help. Please let me know your thoughts.