Batch Apex Syntax and Example: Syntax: global class SynERPAccount_With_Account implements Database.Batchable<sObject>{ //Set up the base query global Database.querylocator start(Database.BatchableContext BC) { return Database.getQueryLocator([select Id, Name from Account where status=’Active’]); //Thestartmethod …
APEX
-
-
Apex has the following types of collections: S.No Collection Name Description Example 1 List Ordered collection of typed primitives, sObjects, objects, or collections that are distinguished by their indices // …
-
Annotations are defined with an initial @ symbol, followed by the appropriate keyword. To add an annotation to a method, specify it immediately before the method or class definition. Apex supports the following …
-
Below is the Query to get the Owner Name and Last Modified By Name in Task Object SOQL: select owner.name,LastModifiedBy.name from task where id =t.id
- APEXSALESFORCESOQL
How to get the current year records from custom object where year is in a text field
How to get the current year records from custom object where year is in a text field? String dateOfToday = String.valueOf(Date.today().year()); Then your SOQL would include this in the where …
-
VisualForce and Apex Class in Salesforce 1. SalesForce provides two ways to build user interfaces. These are Page Builder and VisualForce. PageBuilder automatically generates pages with default look-and-feel. VisualForce allows …
-
To use an Email Template from Apex Class in order to send an email: In order to send an email from apex class, you can use any of the below …
-
In short how to do an apex callout from Class..Apex class:*******************************************global class with sharing ApexCallout{public void callout() {//Construct a HTTP RequestHttpRequest req = new HttpRequest() ;string strUrl=’**********Place your Remote Site Address here**********”;//Before making this callout, you need to …
-
Scenario: Need to do Totals of Stages in Opportunity for the entire org. Thought Process: What are the columns involved? Answer: StageName and Count or Total What methods will we …
-
Scenario: I came across a issue where visualforce does not allow one to Count or Sum records in cialis free trial a page. One solution would be to add more …