Module: Apex Basics & Database (answers)

Apex Basics & Database (Answers)

#1.Get Started with Apex

Hands-on Challenge
+500 points
GET READY
You’ll be completing this challenge in your own hands-on org. Click Launch to get started, or click the name of your org to choose a different one.
If you use Trailhead in a language other than English, make sure that your hands-on org is set to the same language as the challenge instructions. Otherwise, you may run into issues passing this challenge. Want to find out more about using hands-on orgs on Trailhead? Check out Trailhead Playground Management.

Module: Apex Basics & Database (Answers)
<!-- wp:heading -->
<h2>#1.Get Started with Apex</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Hands-on Challenge<br>+500 points<br>GET READY<br>You’ll be completing this challenge in your own hands-on org. Click Launch to get started, or click the name of your org to choose a different one
Get Started with Apex

#2.Use sObjects

1Describe the relationship between sObjects and Salesforce records.

I)The name of an sObject field in Apex is the label of the field in Salesforce.
II) A custom object’s API name and label are the same.
III)Every record in Salesforce is natively represented as an sObject in Apex.
[bg_collapse view=”button-orange” color=”#4a4949″ expand_text=”Show Answers” collapse_text=”Close Answer” ]
III)Every record in Salesforce is natively represented as an sObject in Apex.
[/bg_collapse]

Q.2)You can obtain an instance of an sObject, such as Account, in one of the following ways:

I)By creating the sObject only.
II) Either by creating the sObject or by retrieving a persistent record from Salesforce using SOQL.
III)By retrieving the sObject only.
[bg_collapse view=”button-orange” color=”#4a4949″ expand_text=”Show Answers” collapse_text=”Close Answer” ]
II) Either by creating the sObject or by retrieving a persistent record from Salesforce using SOQL.
[/bg_collapse]

Q.3)Which of the following is correct about a generic sObject variable?

I)A generic sObject variable can be assigned only to another generic sObject.
II)Generic sObjects can’t be created.
III)A generic sObject variable can be assigned to any specific sObject, standard or custom. Such as Account or Book__c.
[bg_collapse view=”button-orange” color=”#4a4949″ expand_text=”Show Answers” collapse_text=”Close Answer” ]
III)A generic sObject variable can be assigned to any specific sObject, standard or custom. Such as Account or Book__c.
[/bg_collapse]

#3.Manipulate Records with DML

#3.Manipulate Records with DML

#4.Write SOQL Queries

#4.Write SOQL Queries

Pramod Kumar Yadav is from Janakpur Dham, Nepal. He was born on December 23, 1994, and has one elder brother and two elder sisters. He completed his education at various schools and colleges in Nepal and completed a degree in Computer Science Engineering from MITS in Andhra Pradesh, India. Pramod has worked as the owner of RC Educational Foundation Pvt Ltd, a teacher, and an Educational Consultant, and is currently working as an Engineer and Digital Marketer.



Leave a Comment