Salesforce Test 1 For Ranking

Salesforce Test 1 For Ranking

University

68 Qs

quiz-placeholder

Similar activities

Database Design

Database Design

University

70 Qs

ИКТ (1-66  MS.ACCESS)

ИКТ (1-66 MS.ACCESS)

University

67 Qs

Productivity Application BSIT 1J

Productivity Application BSIT 1J

University

70 Qs

Android App Development

Android App Development

University

70 Qs

CC 105

CC 105

University

63 Qs

MUITICT_12_test

MUITICT_12_test

University

71 Qs

PRELIMINARY EXAMINATION CC106

PRELIMINARY EXAMINATION CC106

University

65 Qs

JENIS-JENIS HARDWARE (KELAS 3)

JENIS-JENIS HARDWARE (KELAS 3)

3rd Grade - University

65 Qs

Salesforce Test 1 For Ranking

Salesforce Test 1 For Ranking

Assessment

Quiz

Computers

University

Medium

Created by

Shivam Chaturvedi

Used 1+ times

FREE Resource

68 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be the output of this Apex code? Integer sum = 0; List nums = new List{2, 4, 6}; for(Integer i : nums){ if(i % 2 == 0){ sum += i; } } System.debug(sum);

12

6

0

10

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result of the following Apex code? Map myMap = new Map(); myMap.put('A', 10); myMap.put('B', 20); myMap.put('A', 30); System.debug(myMap.get('A'));

10

20

30

Null

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does the following Apex code do? Set accIds = new Set(); for(Account acc : Trigger.new){ accIds.add(acc.Id); }

Deletes the account records

Creates duplicate account IDs

Stores unique Account Ids

Throws compile-time error

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What will be the result of this Apex code? List accList = [SELECT Id FROM Account LIMIT 2]; delete accList; System.debug('Deleted');

Deletes only one record

Deletes two records

Causes an error

Updates records

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the correct bulkified version of this trigger logic? trigger AutoTask on Opportunity (after insert) { for(Opportunity opp : Trigger.new){ Task t = new Task(Subject='Follow Up', WhatId=opp.Id); insert t; } }

Move loop inside insert

Create one task per opportunity

Use a List to collect and insert tasks outside the loop

Use SOQL inside loop

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does this code snippet do? List accounts = new List(); for(Integer i = 0; i < 3; i++){ accounts.add(new Account(Name='Test' + i)); } insert accounts;

Inserts 3 accounts with same name

Inserts 3 accounts with unique names

Fails due to duplicate

Fails due to null values

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What exception is thrown when a DML statement fails partially? try { insert new List{ new Account(Name='Test1'), new Account() // Missing required field }; } catch(Exception e){ System.debug(e.getMessage()); }

NullPointerException

QueryException

DmlException

ListException

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?