Salesforce Test 1 For Ranking

Salesforce Test 1 For Ranking

University

68 Qs

quiz-placeholder

Similar activities

IT223- Networking Assessment # 1

IT223- Networking Assessment # 1

University

70 Qs

7th standard foxpro

7th standard foxpro

KG - University

70 Qs

Types of Testing

Types of Testing

University

67 Qs

SQL-Quiz

SQL-Quiz

University

66 Qs

MUITICT_06_test

MUITICT_06_test

University

72 Qs

GUI DAN CLI

GUI DAN CLI

KG - University

70 Qs

Review for Fall Semester Exam - CTE

Review for Fall Semester Exam - CTE

8th Grade - University

70 Qs

Android Final

Android Final

University

71 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

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?