wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Apex and Salesforce Quiz 1

Total questions: 100

Worksheet time: 50mins

Name
Class
Date
1.

Which language is Apex most similar to?

a)

Python

b)

Java

c)

C++

d)

JavaScript

2.

Apex runs primarily on which platform?

a)

Microsoft .NET Framework

b)

Salesforce Platform

c)

Oracle Cloud

d)

AWS Lambda

3.

Which of the following is a strongly typed, object-oriented language?

a)

Apex

b)

.NET C#

c)

Both a and b

d)

None

4.

Which keyword is used to define a class in Apex?

a)

class

b)

Class

c)

define

d)

package

5.

Apex code executes in which environment?

a)

Sandbox and Production

b)

Only Sandbox

c)

Only Production

d)

Client-side browser

6.

Which statement about Apex is true?

a)

It is case-sensitive

b)

It is not case-sensitive

c)

It cannot use DML

d)

It cannot use SOQL

7.

Which is the entry point for Apex execution?

a)

Main method

b)

Trigger or Class method

c)

API call

d)

Anonymous block

8.

Apex transaction means:

a)

Execution of one SOQL query

b)

A single unit of work in database operations

c)

Multiple users logged in at once

d)

Rollback of governor limits

9.

Which feature allows calling Apex code asynchronously?

a)

Queueable

b)

Batch Apex

c)

Future methods

d)

All of the above

10.

Which method is used to perform DML in Apex?

a)

insert

b)

update

c)

delete

d)

All of the above

11.

Apex code is stored and compiled in:

a)

Client system

b)

Cloud (Salesforce servers)

c)

Local IDE

d)

Visualforce pages

12.

Which language runs on .NET similar to Apex on Salesforce?

a)

Java

b)

Python

c)

C#

d)

PHP

13.

Which data type can formulas return?

a)

Text

b)

Number

c)

Date

d)

All of the above

14.

Which function checks if a field is blank?

a)

ISNULL()

b)

ISBLANK()

c)

ISNUMBER()

d)

ISDATE()

15.

Validation rules are executed when?

a)

Before records are saved

b)

After records are saved

c)

When reports are run

d)

When dashboards are refreshed

16.

Which operator is used for concatenation in formulas?

a)

&

b)

+

c)

||

d)

CONCAT()

17.

Which function returns the current user's profile?

a)

$Profile.Name

b)

USER()

c)

CURRENTUSER()

d)

$User.Profile

18.

A formula returning TRUE in validation rule means:

a)

Record saves successfully

b)

Error message is displayed

c)

Workflow triggers

d)

Nothing happens

19.

Which of these cannot be used in a formula field?

a)

Cross-object fields

b)

Fields from unrelated objects

c)

Functions like TODAY()

d)

Math operators

20.

Which function extracts part of a text field?

a)

FIND()

b)

LEFT()

c)

RIGHT()

d)

All of the above

21.

Validation rules can reference fields from how many objects?

a)

One

b)

Multiple via cross-object references

c)

Unlimited objects

d)

None

22.

Which function returns the current date?

a)

DATE()

b)

TODAY()

c)

NOW()

d)

CURRENTDATE()

23.

Which field type does not support formulas?

a)

Text

b)

Checkbox

c)

Auto Number

d)

Number

24.

Which function calculates age from birthdate?

a)

DATEVALUE()

b)

YEAR(TODAY()) - YEAR(Birthdate)

c)

NOW()

d)

ADDYEARS()

25.

Which formula returns TRUE if the record owner is current user?

a)

$User.Id = OwnerId

b)

$Profile.Id = OwnerId

c)

USERID() = $Owner

d)

CURRENTUSER = RecordOwner

26.

Which relationship type represents a parent-child hierarchy?

a)

Master-Detail

b)

Lookup

c)

Junction

d)

External

27.

Which object type is provided by Salesforce by default?

a)

Custom

b)

Standard

c)

Virtual

d)

Managed

28.

How many Master-Detail relationships can a custom object have?

a)

1

b)

2

c)

3

d)

Unlimited

29.

A junction object is used to implement which relationship?

a)

One-to-Many

b)

Many-to-Many

c)

One-to-One

d)

Hierarchical

30.

Which field uniquely identifies each record?

a)

Auto Number

b)

Text field

c)

Record ID

d)

Master field

31.

Which field type allows values calculated from other fields?

a)

Formula field

b)

Lookup field

c)

Master-detail field

d)

Auto Number

32.

In Salesforce, object relationships are defined using:

a)

Schema Builder

b)

Setup Menu

c)

Object Manager

d)

All of the above

33.

External lookup relationship is used to link Salesforce object with:

a)

Standard object

b)

Custom object

c)

External object

d)

Hierarchical object

34.

Roll-up summary fields work only with:

a)

Lookup relationship

b)

Master-Detail relationship

c)

External relationship

d)

Self-relationship

35.

Which field cannot be used as an external ID?

a)

Number

b)

Text

c)

Email

d)

Formula

36.

Which type of relationship can exist between Account and Contact?

a)

Master-Detail

b)

Lookup

c)

Self

d)

Junction

37.

A schema diagram in Salesforce is called:

a)

Object Manager

b)

Schema Builder

c)

Data Designer

d)

ERD

38.

A child record in Master-Detail relationship is deleted when:

a)

Parent record is deleted

b)

Child record is deleted

c)

Validation rule runs

d)

Workflow is triggered

39.

Which tool is used to load more than 50,000 records?

a)

Data Loader

b)

Data Import Wizard

c)

Reports

d)

Developer Console

40.

Data Import Wizard supports importing up to:

a)

10,000 records

b)

20,000 records

c)

50,000 records

d)

100,000 records

41.

Which tool allows scheduling of data exports?

a)

Data Loader

b)

Data Export Service

c)

Reports

d)

Workbench

42.

Which format is supported for data import/export?

a)

CSV

b)

JSON

c)

XML

d)

All of the above

43.

Which API is used by Data Loader for bulk data?

a)

REST API

b)

SOAP API

c)

Bulk API

d)

Metadata API

44.

Which tool is browser-based?

a)

Data Loader

b)

Data Import Wizard

c)

Command-line Data Loader

d)

ETL

45.

To update existing records, you must provide:

a)

Name field

b)

Record ID or External ID

c)

CreatedDate

d)

Owner ID

46.

Which operation is not supported in Data Import Wizard?

a)

Insert

b)

Update

c)

Upsert

d)

Delete

47.

Which Salesforce tool helps to avoid duplicate data during import?

a)

Duplicate Management

b)

Workflow Rules

c)

Validation Rules

d)

Triggers

48.

Which field cannot be changed using Data Loader?

a)

Owner

b)

CreatedDate

c)

Custom field

d)

Text field

49.

What happens if you import a CSV with incorrect column mapping?

a)

Records are rejected

b)

Records are inserted partially

c)

Data is corrupted

d)

All records deleted

50.

Which Salesforce tool is best for small, simple imports by end users?

a)

Data Import Wizard

b)

Data Loader

c)

Workbench

d)

Dataloader.io

51.

What is the main purpose of an approval process in Salesforce?

a)

Automate record validation

b)

Route records for review and approval

c)

Update data automatically

d)

Generate reports

52.

What is the first step in creating an approval process?

a)

Define entry criteria

b)

Select the object

c)

Add approval actions

d)

Activate the process

53.

Which action can be configured in an approval process?

a)

Field Update

b)

Email Alert

c)

Task Assignment

d)

All of the above

54.

If no approver is assigned, who becomes the default approver?

a)

System Admin

b)

Record Owner

c)

Queue

d)

First Manager in the hierarchy

55.

Which type of action occurs immediately when approval is submitted?

a)

Initial Submission Action

b)

Final Approval Action

c)

Final Rejection Action

d)

Recall Action

56.

What happens if a record does not meet entry criteria for approval process?

a)

It is deleted

b)

It cannot be submitted

c)

It goes for default approval

d)

It is auto-approved

57.

Can multiple approval processes exist for the same object?

a)

Yes

b)

No

58.

Which flow type is used to automate processes when a record is created or updated?

a)

Screen Flow

b)

Record-Triggered Flow

c)

Autolaunched Flow

d)

Scheduled Flow

59.

Record-triggered flows run:

a)

Before save or after save

b)

Only before save

c)

Only after save

d)

During user login

60.

Which type of flow is best for fast field updates?

a)

Before-save record-triggered flow

b)

After-save record-triggered flow

c)

Screen flow

d)

Subflow

61.

Which flow element is used to get data from Salesforce objects?

a)

Assignment

b)

Get Records

c)

Update Records

d)

Decision

62.

What happens if a record-triggered flow has no decision elements?

a)

It runs for all records meeting trigger condition

b)

It fails

c)

It requires user input

d)

It goes inactive

63.

Record-triggered flows replace which tool?

a)

Workflow Rules and Process Builder

b)

Validation Rules

c)

Reports

d)

Apex Classes

64.

Which tool provides debug logs for flows?

a)

Setup Audit Trail

b)

Flow Debug Tool

c)

Apex Test Execution

d)

Schema Builder

65.

Which search engine powers Salesforce global search?

a)

Apache Solr

b)

ElasticSearch

c)

Lucene

d)

Salesforce Search Index

66.

Which field type is always searchable?

a)

Formula field

b)

Text field

c)

Encrypted field

d)

Long Text Area

67.

What feature helps improve search relevance?

a)

Synonym Groups

b)

Validation Rules

c)

Approval Processes

d)

Duplicate Rules

68.

Knowledge Articles can be searched using:

a)

Global Search

b)

Article Search

c)

Both a and b

d)

None

69.

Search filters can be configured at:

a)

Object level

b)

Field level

c)

Both a and b

d)

None

70.

Which query language is used in Apex to fetch records?

a)

SQL

b)

SOQL

c)

SOSL

d)

Both b and c

71.

Which statement is valid DML in Apex?

a)

save record;

b)

update record;

c)

write record;

d)

commit record;

72.

Which collection types are available in Apex?

a)

List

b)

Set

c)

Map

d)

All of the above

73.

Which method prevents SOQL injection in Apex?

a)

Dynamic SOQL

b)

Bind variables

c)

Hardcoding IDs

d)

Static queries only

74.

Which governor limit exists in Apex?

a)

Max 50,000 records in SOQL query

b)

Max 150 DML statements

c)

Max 100 callouts

d)

All of the above

75.

Which exception type is handled in Apex?

a)

DmlException

b)

NullPointerException

c)

QueryException

d)

All of the above

76.

Which method is used for inserting a list of records?

a)

addAll()

b)

insert

c)

insertAll()

d)

save()

77.

What happens when governor limits are exceeded in Apex?

a)

Apex retries execution

b)

Unhandled exception is thrown

c)

Record is saved partially

d)

Transaction commits automatically

78.

SOSL is used to:

a)

Search across multiple objects

b)

Query one object at a time

c)

Perform DML operations

d)

Define schema

79.

Which method checks if a list is empty in Apex?

a)

isEmpty()

b)

size()

c)

isBlank()

d)

count()

80.

Which event runs before a record is saved?

a)

before insert

b)

after insert

c)

before delete

d)

after delete

81.

A trigger is always associated with:

a)

An Apex class

b)

A Salesforce object

c)

A workflow rule

d)

A queue

82.

Trigger.new contains:

a)

Old version of records

b)

New version of records

c)

Both old and new

d)

Nothing

83.

Which context variable is available only in after triggers?

a)

Trigger.new

b)

Trigger.old

c)

Trigger.newMap

d)

Trigger.oldMap

84.

How many triggers can exist per object?

a)

1

b)

10

c)

Unlimited

d)

Multiple, but logically consolidated

85.

Which keyword prevents recursion in triggers?

a)

static variable

b)

private variable

c)

final variable

d)

constant

86.

Which trigger event is used to access system-generated ID of a record?

a)

before insert

b)

after insert

c)

before update

d)

after delete

87.

Which method is best practice for trigger logic?

a)

Write everything in trigger body

b)

Use Trigger Handler class

c)

Use Workflow instead

d)

Avoid DML

88.

Which happens first in Salesforce order of execution?

a)

Before triggers

b)

Validation rules

c)

Workflow rules

d)

Assignment rules

89.

Which executes immediately after before triggers?

a)

Validation rules

b)

Workflow rules

c)

After triggers

d)

Roll-up summary fields

90.

Which runs last in order of execution?

a)

Before triggers

b)

Assignment rules

c)

Post-commit logic (e.g., email sending)

d)

Validation rules

91.

Roll-up summary fields are recalculated:

a)

Before triggers

b)

After triggers

c)

During validation rules

d)

Before workflow

92.

If workflow updates a field, what happens next?

a)

Validation rules

b)

Triggers re-execute

c)

Nothing happens

d)

Record is locked

93.

Assignment rules are executed after:

a)

Before triggers

b)

Validation rules

c)

After triggers

d)

Workflow field updates

94.

Which asynchronous method is used for simple background jobs?

a)

Batch Apex

b)

Future methods

c)

Queueable Apex

d)

Schedulable Apex

95.

Which type of Apex allows chaining of jobs?

a)

Future methods

b)

Batch Apex

c)

Queueable Apex

d)

Scheduled Apex

96.

Maximum batch size in Batch Apex is:

a)

50

b)

200

c)

2,000

d)

5,000

97.

Which method is used to schedule an Apex job?

a)

System.enqueueJob()

b)

System.schedule()

c)

Database.executeBatch()

d)

runSchedule()

98.

Which annotation is used for future methods?

a)

@future

b)

@async

c)

@queueable

d)

@batch

99.

Batch Apex is useful for:

a)

Handling small data sets

b)

Processing large volumes of data in chunks

c)

Real-time execution

d)

Debug logs only

100.

Which asynchronous feature supports callouts to external systems?

a)

Future methods

b)

Batch Apex

c)

Queueable Apex

d)

All of the above