Dynamically loading related content without controller in visualforce

In visualforce usually for loading additional content based on user actions, we use ajax and custom controllers. But if you are targeting to load details tab of some records, it can be done without using custom controllers or extensions. Please check the sample code below,


As mentioned previously this method helps you to show additional content through ajax without using controller. In order to use it please follow below steps
  • Create a visualforce page with some name (example - samplePage) 
  • Copy above code into the page and save the page
  • Create one account and some contacts under it.
  • Pass the ID of the account to the custom page (instance.com/apex/samplePage?id=0019000000BzKjL)
  • It will show the account name and contacts under the account.
  • Hover over any contact, it will show the details of the contact below.
Here we are making use of $currentPage global merge fieldtype. General syntax is $CurrentPage.Parameters.parameterName

    1 comment:

    1. Latest Certification Dumps of Salesforce , Amazon , IBM , Microsoft, SAP, Oracle , VMware available at https://www.ebsose.com or mail us at ebsosedotcom@gmail.com or certificationdirectdumps@gmail.com for any dumps / Superbadge /Development project queries . Get Fast replies and our team is available 24/7 . Success rate is 99.99% , so hurry and ping us .
      Reach out at ebsosedotcom@gmail.com for any development project or superbadge help required in salesforce or any other technology .

      ReplyDelete