Order of execution in Salesforce Visualforce Page
1. Constructor of the controller. 2. Action method of the page. 3. Getter methods. 4. If there are any client-side technologies on the page, such as JavaScript, the browser executes them. ....
1. Constructor of the controller. 2. Action method of the page. 3. Getter methods. 4. If there are any client-side technologies on the page, such as JavaScript, the browser executes them. ....
Sample Code: Visualforce page: <apex:page controller="Sample"> <apex:pageBlock > <apex:image value="{!photoURL}"/> </apex:pageBlock> </apex:page> Apex Controller: public class Sample { public String ....
Sample Code:global class SubscribeOrUnsubscribeLead { webservice static String subscribeLead(Id leadId) { List<EntitySubscription> listEntitySub = new List<EntitySubscription>(); listEntitySub = [SELECT Id ....
If you face this issue, modify the code as below alert(sforce.apex.execute("InfallibleTech.SubscribeOrUnsubscribeLead","unSubscribeLead",{"{!Lead.Id}"})); For String and Id, quotes should be used. Cheers!!!
If you face "Problem with Onclick JavaScript 'No operation available for request...'" issue, check the below If you have Namespace prefix, you have to write the code as below in ....
1. Go to setup --> Create --> Tabs. 2. Click "New" in Custom Object Tabs section. To create records, go to the tab and click "New" button.
getGlobalDescribe(): Returns a map of all sObject names (keys) to sObject tokens (values) for the standard and custom objects defined in your organization. Sample map: public static Map<String, Schema.SObjectType> getGlobalDescribe() ....
You can instantiate a StandardSetController in either of the following ways: 1. From a list of sObjects: List<account> accountList = [SELECT Name FROM Account LIMIT 20]; ApexPages.StandardSetController ssc = new ....
Using Salesforce Apex, if you want to verify at run time or dynamically whether an object is actually an instance of a particular class, then we can make use of ....