What is a correct pattern to follow when programming in Apex on a - ProProfs Discuss
Topics
Products
Follow Us:

What is a correct pattern to follow when programming in Apex on a Multi-tenant platform?



A. Apex code is created in a separate environment from schema to reduce deployment errors.
B. DML is performed on one record at a time to avoid possible data concurrency issues.
C. Queries select the fewest fields and records possible to avoid exceeding governor limits.
D. Apex classes use the with sharing\ keyword to prevent access from other server tenants.

This question is part of Salesforce Platform Developer 1
Asked by Wyatt Williams, Last updated: Jan 20, 2020

+ Answer
Request

2 Answers

J. Emmerich

J. Emmerich, Web Content Writer, New York City

Answered Feb 14, 2019

The correct answer to this question is C. There are governor limits to the Apex runtime on the multi-tenant platform. This is because the multi-tenant environment could monopolize their shared resources.

The Apex governor limits will ensure that the Apex code or processes will not be able to do that. There is a set table that includes all of the limits set by the governor that should not be exceeded.

The table includes limits for synchronous Apex and asynchronous Apex. If some Apex code or processes exceed one of the governor's limits, the respective governor will issue a runtime exception that will not be handled by the user.

 

John Smith

John Smith

Answered Jul 09, 2017

Queries select the fewest fields and records possible to avoid exceeding governor limits.

####
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.