Place buttons inside an enhanced list

Place buttons inside an enhanced list:

There are some scenario where we need to place place buttons inside enhanced list view and list view.

Follow the below steps:

  • Create a button and upload it as static resources.
  • Now create a field on the lead object with the type as formula. 
  • The formula field will have the following formula:
  • From the above formula, you can see it has a Hyperlink which calls java script method on the visual force page and which refers the static resource to show the buttons.
  • Now go to the visual force page, edit the view and select the formula field which is created and save the view.
  •   The buttons will be visible in the enhanced list view now.
<apex:page > <apex:enhancedList height="400" type="Lead" rowsPerPage="10"/> <script type="text/javascript"> function convertLead(Id){ alert(Id); } </script> </apex:page>




Comments

Post a Comment

Popular Posts