Free Salesforce Developers Tutorials >

Chapter 8 - Apex DML and Database Methods >

Apex DML Basics

Apex DML Basics

What You’ll Learn


tickWhat is DML in Apex?

tickWhat DML is used for?

ticSyntax of writing DML statements

S2 Labs

What Is DML In Salesforce?

DML stands for Data Manipulation Language through which we can make database changes.

What DML is used for?

it enables you to:

  • Insert new records in Salesforce
  • Update existing records
  • Upsert records
  • Delete records from the database
  • Undelete or restore records from the recycle bin

Syntax of using DML:

insert sObject or list of sObjects

update sObject or list of sObjects

delete sObject or list of sObjects

upsert sObject or list of sObjects

undelete sObject or list of sObjects
Note:

In the above statements, if even a single record errors out in the entire list of records then the entire operation is rollbacked.

Salesforce Developer Training

Download Study Material

Get access to exclusive study material for Salesforce Certification and ace your exams!

Download Now

Our Salesforce Certification Courses

Hey there! Glad you made it through our Salesforce Developer Training for beginners . But wait! We've got some high-in-demand Salesforce courses for you to take your Salesforce skills to the next level, making you a desired professional in the Salesforce job market.

Post a Comment

Your email address will not be published. Required fields are marked *