Salesforce Test 1 For Ranking

Salesforce Test 1 For Ranking

University

68 Qs

quiz-placeholder

Similar activities

Exchange Quiz

Exchange Quiz

KG - University

70 Qs

Modules 9 - 12

Modules 9 - 12

University

68 Qs

Data Communication and Networking 3 Prefinal Exam

Data Communication and Networking 3 Prefinal Exam

University

71 Qs

SE2 - Lesson 3 (Systems Analysts Tools)

SE2 - Lesson 3 (Systems Analysts Tools)

University

69 Qs

IBCA Semester Exam Review

IBCA Semester Exam Review

KG - University

66 Qs

Online Quiz in HTML and CSS Prepared by Pele Flores

Online Quiz in HTML and CSS Prepared by Pele Flores

University

68 Qs

MS WORD, POWERPOINT, EXCEL

MS WORD, POWERPOINT, EXCEL

University

70 Qs

All About ICT

All About ICT

3rd Grade - University

65 Qs

Salesforce Test 1 For Ranking

Salesforce Test 1 For Ranking

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Shivam Chaturvedi

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?