HOW TO PASS PARAMETERS TO VISUALFORCE PAGES AND BETWEEN PAGES
I am sure we all came to different situations where we need to pass parameters to VisualForce pages while doing Salesforce development. So I thought of putting all scenarios together in a single post with the solution approach. So without any further introduction, let’s get into the actual agenda quickly.Check out my youtube channel for more Salesforce videos -https://www.youtube.com/channel/UC3xFLBRl5JwqqTXbCd5p4YQAll about Salesforce Release Spring 21 here.First, let me explain the basic -WHAT IS A PARAMETER ?A parameter is a name-value pair which is embedded at the end of the url of a page. The first parameter always starts with ‘?’ and all the subsequent parameters start with a ‘&’.Let’s take the below example -http://sudipta-deb.blogspot.in/?firstname=Sudipta&lastname=DebThe first parameter is firstname=Sudipta where name is firstname and value is SudiptaThe second parameter is lastname=Deb where name is lastname and value is DebWith the basic explained, let me start with different scenarios and solution approachSCENARIO 1 – PASSING PARAMETER FROM CUSTOM BUTTONSometimes it may be required that by clicking on custom button we need to open a new VisualForce page and pass parameters to that new page. For example – if we create a custom button for Account object, while configuring if we choose VisualForce page we can select only those VisualForce pages having standardController=”Account” set. To overcome this, we need to choose Content Source as url while configuring Custom Button. Screenshot is given below -Below is the...
Read More