How to test static methods in Salesforce?
To test static methods in Salesforce, we have to call the method along with the controller name, not with the object of the controller. Example: Apex Class: public class example ....
To test static methods in Salesforce, we have to call the method along with the controller name, not with the object of the controller. Example: Apex Class: public class example ....
Example: Apex Class: global class web{ Webservice static String fetch(Id localId) { return localId; }} Custom Button Javascript: {!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")}{!REQUIRESCRIPT("/soap/ajax/15.0/apex.js")}var r = confirm("Are you sure want to fetch?");if(r == true){ var ....
In test class and methods, we can access data in the organization. Prior to it we can just access test data. Using this we can access organization data. ....
Salesforce License Full CRM access We can see Standard apps and custom apps Supports Case object Salesforce Platform License Partial CRM access We can see only custom apps Doesn't support ....
For MM/DD/YYYY format: <apex:outputText value="{0,date,MM/dd/yyyy}" > <apex:param value="{!dateField}"/> </apex:outputText> Sample Code: Visualforce page: <apex:page controller="Sample" > <apex:form > <apex:outputText value="{0,date,dd'/'MM'/'yyyy}" > <apex:param value="{!temp}"/> </apex:outputText> </apex:form> </apex:page> Apex Controller: public with ....
Sample code: Visualforce page: <apex:page controller="Graph" > <apex:pageblock title="Members and their Years of experience" > <apex:chart height="250" width="350" data="{!pieData}"> <apex:pieSeries tips="true" dataField="data" labelField="name" donut="50"/> <apex:legend position="bottom"/> </apex:chart> </apex:pageblock> ....
Sample Code: Visualforce page: <apex:page controller="Graph" > <apex:pageblock title="Members and their Years of experience" > <apex:chart height="250" width="350" data="{!pieData}"> <apex:pieSeries tips="true" dataField="data" labelField="name"/> <apex:legend position="bottom"/> </apex:chart> </apex:pageblock> <apex:pageblock title="Members and ....
Delete Database.Delete Delete doesn't return any values. Database.delete returns a list of results so that you can identify the problems. If there are problems you will get a DMLException and ....
1. What is an alternative for workflow? Trigger Process Builder Schedule apex. 2. What is the use of isNew()? Checks whether the record is newly created. 3. If you organization ....
Sample Code: Visualforce page: <apex:page controller="Sample" sidebar="false"><apex:form > <apex:pageBlock > <apex:pageblockTable value="{!memb}" var="m"> <apex:column value="{!m.Name}"/> </apex:pageblockTable> <apex:pageblockTable value="{!interst}" var="i"> <apex:column value="{!i.Name}"/> </apex:pageblockTable> </apex:pageBlock></apex:form> </apex:page> Apex Controller: public class Sample{ ....