Back to Browse

Salesforce | Apex | SOQL | Governer Limits | DML |Exceptional Statement | Locking Statement

2.0K views
Jun 12, 2022
1:53:32

Salesforce Realtime Training Apex Session 06 By Swapna SOQL : Salesforce Object Query Language: #SOQL is to built in query string, used to retrive the data from salesforce. Usage : 1 In the querystring parameter in the query call 2 In Apex Statement 3 In Visualforce Page controller 4 In schema Explorer of the Force.Com IDE 5 Aura Method controller Syntax: SELECT API fieldName FROM API Table Name -- Account : 100,000 WHERE Condition WITH filteration GROUP BY API fieldName HAVING Condition ORDER BY API FieldName LIMIT NUmber OFFSET Number #GovernerLimits: Apex class Total Number of SOQL queries issued: 100, 200, Total Number of SOQL records retrived by SOQL query -- 50,000 -- single SOQL -2,000 TIP : never use the SOQL query inside the loops never ever use DML inside for loops 8. DML Data Manipulation Language: : Apex Program that enables developer to perform CRUD Operations Create, retrieve, update , delete during runtime : insert , update, delete, retrieve or restore data in database. 2 types of DML statements Atomic DML Non-Atomic DML Atomic DML Non-Atomic DML DML Statements Database class Methods insert Database.insert update Database.update upsert Database.upsert delete Database.delete undelete Database.undelete merge Database.merge TIP : Upsert is Data loading /Batch 9.#ExceptionalStatement : Apex statement, that capture error during the destruction of normal flow of code execution and takes corrective mesurement try catchException e 10. Locking Statement : Apex statement that locks sobject record from being updated 'For Update' Keyword SOQL SELECT id,Name From Account where Name='Amazon' For Update

Download

0 formats

No download links available.

Salesforce | Apex | SOQL | Governer Limits | DML |Exceptional Statement | Locking Statement | NatokHD