How to get the Visual Force Page Name Using Apex Class? We can get the Visual Force Page Name Using Apex Class, below is the Example: [java] public string getVFPageName() …
APEX
-
-
How to get the Salesforce Instance Server URL from APEX Class? This can be used to get the ID of current record. [java] ApexPages.CurrentPage().getParameters().get(‘id’); [/java] This can be used to …
-
How to get the Salesforce Instance Server URL from APEX Trigger? Using trigger we can get the Salesforce Server URL, below is the example: for example, used below codes in …
-
How to execute the batch apex class using developer console? Example: Batch Apex Class: [java] global class accountList implements Database.Batchable<Sobject> { global Database.querylocator start(Database.BatchableContext BC) { return Database.getQueryLocator([select Id, Name …
-
List the commonly used API calls in salesforce ● Create ● Update ● Upsert ● Delete ● Undelete ● Query ● Retrieve
- APEXSALESFORCETrigger
List the order in which automation features trigger when a user saves a record
List the order in which automation features trigger when a user saves a record -All Apex BEFORE Triggers -System Validation Rules -Custom Validation Rules -All Apex AFTER triggers -Assignment Rules …
-
How to return a PageReference to create a sObject in salesforce Using Static: PageReference ref = new PageReference(‘/a00/e’); Using SObject: public PageReference customObjectPageReference() { Schema.DescribeSObjectResult R = YourCustomObject__c.SObjectType.getDescribe(); // Add …
-
Salesforce – List has no rows for assignment to SObject if you using following code in Apex and Error should throw like “List has no rows for assignment to SObject”. …
-
Checking the Current DateTime field in SOQL Apex Code Example: Event e=[Select ActivityDateTime From Event where whatid=:tsk.whatid and what.type = ‘Account’ and ActivityDateTime <> null and ActivityDateTime <=:system.now()];
-
How to get List Of All Standard Objects using APEX Class Use the describeGlobal() API call: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describeglobal_describeglobject. Coding Example : http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describeglobal.htm#topic-title