How to call Javascript from Command button in Visuaforce page?
Sample Visualforce page: <apex:page > <script> function show(){ alert('Test'); } </script> <apex:form > <apex:pageBlock > <apex:pageBlockButtons ....
Sample Visualforce page: <apex:page > <script> function show(){ alert('Test'); } </script> <apex:form > <apex:pageBlock > <apex:pageBlockButtons ....
Sample Code: Visualforce page: <apex:page controller="SampleController"> <apex:form > <apex:pageBlock > <apex:pageBlockTable value="{!empList}" var="e"> <apex:column value="{!e.Name}"/> ....
Visualforce page: <apex:page controller="PDFController"> <apex:pageBlock > <apex:pageBlockTable value="{!listEmployees}" var="e"> <apex:column value="{!e.Name}"/> <apex:column value="{!e.Age__c}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:page> Apex Controller: public class PDFController { public List<Employee__c> listEmployees {get;set;} public PDFController() { listEmployees ....
To create and view Visualforce page in Salesforce, follow the below steps 1. Go to Setup --> Develop --> Pages and click "New" button. 2. Click "Preview" button to view ....
Sample Code: Visualforce page: <apex:page controller="DeletingCheckedRowsController"> <apex:pagemessages /> <apex:form > <apex:pageBlock id="pg"> <apex:pageBlockTable value="{!listWrapper}" var="w"> ....
TEXT() is used to convert any data type to String in Visualforce page. Sample Code: Visualforce page: <apex:page controller="SampleController" id="pag"> <apex:form id="frm"> ....
Sample Report: Sample Code: Visualforce page: <apex:page controller="DynamicReportController"> <apex:form > <apex:pageBlock > <apex:pageBlockSection columns="3"> ....
Sample Code: Apex Class: public class EmployeeController { public static void assignSequence(List<Employee__c> listEmployee, Decimal startNum) { Decimal initial = startNum; ....
Sample Code: Visualforce page: <apex:page controller="SampleController"> <script> function callSave(){ var r = confirm("Are you sure want to save?"); if(r == true) { callSav(); } } </script> <apex:form > <apex:actionFunction name="callSav" ....