Salesforce Platform Developer II Sample Questions

  1. Home
  2. Salesforce Platform Developer II Sample Questions
Salesforce Platform Developer II Sample Questions

The Salesforce Platform Developer II program has been intended for applicants who might want to exhibit their abilities and information in advanced programmatic capacities of the Lightning Platform and information demonstrating to foster complex business rationale and connection points. The competitor can configure, create, test, and convey automatic arrangements that are viable, reusable, and follow configuration examples and article situated programming best practices.

The completion of the Salesforce Platform Developer I certification is required for the program.

Advanced Sample Questions

What is the maximum number of custom objects that can be created in a Salesforce org?

  • a) 500
  • b) 1000
  • c) 1500
  • d) 2000

Answer: b) 1000

Explanation: Salesforce has a limit of 1000 custom objects per org. Any additional objects will need to be stored in a different org or via a custom solution.

Which of the following actions can be performed in a trigger?

  • a) Inserting a new record
  • b) Updating an existing record
  • c) Deleting a record
  • d) All of the above

Answer: d) All of the above

Explanation: Triggers can perform all of the above actions, depending on the type of trigger and the conditions specified in the code. Triggers can be used to automate tasks such as inserting, updating, and deleting records.

When using the Force.com platform, what is the maximum length of a text field?

  • a) 1000 characters
  • b) 2000 characters
  • c) 4000 characters
  • d) 8000 characters

Answer: c) 4000 characters

Explanation: The maximum length of a text field in Salesforce is 4000 characters. Any additional characters will need to be stored in a different field type or via a custom solution.

What is the maximum number of formula fields that can be added to an object in Salesforce?

  • a) 100
  • b) 200
  • c) 300
  • d) 400

Answer: a) 100

Explanation: Salesforce has a limit of 100 formula fields per object. Any additional fields will need to be stored in a different object or via a custom solution.

When using the Force.com platform, which of the following is a valid data type for a custom field?

  • a) Phone
  • b) Email
  • c) URL
  • d) All of the above

Answer: d) All of the above

Explanation: Salesforce supports several data types for custom fields, including Phone, Email, and URL. These data types can be used to ensure that the data entered into the field is formatted correctly and can be used for specific purposes such as phone calls or email communication.

What is the maximum number of master-detail relationships that can be created on an object in Salesforce?

  • a) 1
  • b) 2
  • c) 3
  • d) 4

Answer: a) 1

Explanation: Salesforce allows only one master-detail relationship per object. This relationship defines the parent-child relationship between two objects and controls the behavior of the child records.

How can you automate the process of sending an email to a contact when a new account is created in Salesforce?

  • a) Workflow Rule
  • b) Apex Trigger
  • c) Process Builder
  • d) All of the above

Answer: d) All of the above

Explanation: All of the above options can be used to automate the process of sending an email to a contact when a new account is created in Salesforce. Workflow Rules and Process Builder are the easiest options while Apex Triggers provide the most customization options.

What is the maximum number of characters that can be stored in a single line text field in Salesforce?

  • a) 100
  • b) 255
  • c) 500
  • d) 1000

Answer: b) 255

Explanation: The maximum number of characters that can be stored in a single line text field in Salesforce is 255. If more characters are needed, a long text area or rich text area field should be used instead.

How can you enforce data validation on a custom field in Salesforce?

  • a) Formula Field
  • b) Workflow Rule
  • c) Validation Rule
  • d) All of the above

Answer: c) Validation Rule

Explanation: Validation Rules can be used to enforce data validation on a custom field in Salesforce. Validation rules specify conditions under which data entered into a field must meet certain criteria.

When using the Force.com platform, what is the maximum size of a static resource file that can be uploaded?

  • a) 250 MB
  • b) 500 MB
  • c) 1 GB
  • d) 2 GB

Answer: c) 1 GB

Explanation: The maximum size of a static resource file that can be uploaded in Salesforce is 1 GB. Static resources are files such as images, videos, and JavaScript that are stored in Salesforce and can be used in custom pages, components, and other customizations.

Basic Sample Questions

1.) A Visualforce page loads gradually because of the enormous measure of data it shows.
Which system might an engineer at any point use to work on the presentation?

A. Use Javascript to move information handling to the program rather than the regulator.
B. Utilize the transient catchphrases for the List factors utilized in the custom regulator.
C. Utilize lazy loading to stack the information on request, rather than the regulator’s constructor.
D. Utilize an in page to asynchronously load the entirety of the information.

Right Answer: C

2.) Universal Containers needs to utilize a Customer Community with Customer Community Plus licenses so their clients can follow the number of compartments they that are leasing and when they are expected back. A significant number of their clients are worldwide organizations with complex Account progressive systems, addressing different divisions inside a similar association. One of the prerequisites is that sure local area clients inside a similar Account progressive system have the option to see a few divisions’ compartments, in light of an intersection object that relates the Contact to the different Account records that address the divisions.
Which arrangement tackles these prerequisites?

A. A Visualforce page that utilizes a Custom Controller that indicates without sharing to uncover the records
B. A Custom List View on the intersection object with channels that will show the legitimate records in light of the proprietor
C. A Custom Report Type and a report Lightning Component on the Community Home Page
D. An Apex Trigger that makes Apex Managed Sharing records in light of the intersection item’s connections

Right Answer: C

3.) Universal Containers need to utilize an external Web Service given by an outsider merchant to approve that transportation and billing addresses. The ongoing seller utilizes essential secret word confirmation, however, Universal Containers could change to an alternate merchant who utilizes OAuth.
What might permit Universal Containers to change sellers without updating the code to deal with verification?

A. Custom Metadata
B. Custom Setting (List)
C. Dynamic Endpoint
D. Named Credential

Right Answer: D

4.) An organization has a Lightning Page with numerous Lightning Components, some of which cache reference information. It is accounted for that the page doesn’t necessarily in all cases show the latest reference information.
What might an engineer at any point use to examine and analyze the issue in the Lightning Page in Salesforce Platform Developer II?

A. Salesforce Lightning Inspector Actions Tab
B. Salesforce Lightning Inspector Event Log Tab
C. Salesforce Lightning Inspector Transactions Tab
D. Salesforce Lightning Inspector Storage Tab

Right Answer: D

5.) A Visualforce page contains an industry select rundown and showcases a table of Accounts that have a matching worth in their Industry field.
At the point when a client changes the worth in the business select rundown, the table of Accounts ought to be naturally refreshed to show the Accounts related to the chosen business.
What is the ideal method for executing this?

A. Add a inside the .
B. Add a inside the .
C. Add a inside the .
D. Add a inside the .

Right Answer: B

6.) An engineer made and tried a Visualforce page in their designer sandbox, however presently get reports that clients are experiencing ViewState mistakes while involving it in Production.
What should the designer guarantee to address these mistakes?

A. Guarantee questions don’t surpass lead representative cutoff points.
B. Guarantee properties are set apart as Transient.
C. Guarantee properties are set apart as private.
D. Guarantee profiles approach the Visualforce page.

Right Answer: B

7.) An organization’s help cycle directs that any time a Case is shut with a Status of ‘Couldn’t fix’, an Engineering Review custom item record ought to be made and populated with data from the Case, the Contact, and any of the Products related with the Case.
What is the right method for robotizing this utilizing an Apex trigger?

A. An after-update trigger that makes the Engineering Review record and embeds it
B. A preceding update trigger that makes the Engineering Review record and embeds it
C. An after-upsert trigger that makes the Engineering Review record and embeds it
D. A preceding upsert trigger that makes the Engineering Review record and embeds it

Right Answer: A

8.) An organization processes Orders inside their Salesforce example. At the point when an Order’s status changes to ‘Paid’ it should inform the organization’s structure and the board framework
(OMS). The OMS uncovered SOAP web administration endpoints to tune in for when to recover the information from Salesforce.
What is the ideal technique to execute this?

A. Create the Enterprise WSDL and use it to settle on a decision out to the OMS.
B. Produce the Partner WSDL and use it to settle on a decision out to the OMS.
C. Make an Outbound Message that contains the meeting ID and send it to the OMS.
D. Make an Apex trigger and make a callout to the OMS from the trigger.

Right Answer: A

9.) An Apex class doesn’t accomplish anticipated code inclusion. The testSetup technique unequivocally calls a strategy in the Apex class.
How might the engineer create the code inclusion?

A. Check the client has consent passing a client into System.runAs().
B. Call the Apex class technique from a testMethod rather than the testSetup strategy.
C. Add @testVisible to the strategy in the class the designer is trying.
D. Use system.assert() in testSetup to check the qualities are being returned.

Right Answer: B

10.) A designer is attempting to settle on making a Visualforce part or a Lightning part for a custom screen.
Which usefulness thought influences the ultimate choice?

A. Does the screen should be delivered as a PDF?
B. Does the screen should be available from the Lightning Experience UI?
C. Will the screen utilizes a JavaScript system?
D. Will the screen be gotten to by means of a portable application?

Right Answer: C

11.) A designer wishes to work on the runtime execution of Apex calls by reserving results for the client.
What is the most ideal way to execute this?

A. Enrich the server-side strategy with @AuraEnabled(cacheable=true).
B. Set a treat in the program for use upon return to the page.
C. Call the setStorable() technique on the activity in the JavaScript client-side code.
D. Embellish the server-side strategy with @AuraEnabled(storable=true).

Right Answer: C

12.) What is the advantage of JavaScript remoting over Visualforce Remote Objects?

A. Considers indicated re-render targets
B. Requires no Apex code
C. Requires no JavaScript code
D. Upholds complex server-side application rationale

Right Answer: C

13.) A Lightning Component capabilities in review mode and should be utilized inside a Lightning App Builder page, however it isn’t accessible.
What change ought to be applied to the part?

A. Uncover it in the markup utilizing the carries out and get to credits.
B. Erase the part, metadata, and Apex regulator and reproduce them.
C. Revive the sandbox and redesign it to the most recent API variant.
D. Search for mistakes in the rationale in the JavaScript regulator.

Right Answer: A

14.) As of late a Salesforce organization’s coordination fizzled on the grounds that it surpassed the quantity of permitted API brings in a 24-hour time span. The incorporation handles a close to ongoing, complex inclusion of information into Salesforce.
The progression of information is as per the following:
  • The integration looks into Contact records with a given email address and, whenever found, the combination adds a Task to the principal matching Contact it finds.
  • In the event that a match isn’t found, the mix looks into Lead records with a given email address and, whenever found, the joining adds a Task to the main matching Lead it finds.
  • On the off chance that a match isn’t found, the reconciliation will make a Lead and a Task for that recently made Lead.
What is one manner by which the mix can remain close to continuous, yet not surpass the quantity of permitted API brings in a 24-hour time span?

A. Utilize the REST API as well as the SOAP API to really twofold the API calls permitted in a 24-hour time frame.
B. Make an Inbound Message that utilizing Flow can do all of the rationales the reconciliation code was doing.
C. Compose a custom Apex web administration that, given an email address, does all of the rationales the reconciliation code was doing.
D. Make a few Apex InboundEmailHandlers to acknowledge calls from the outsider framework, subsequently bypassing as far as possible.

Right Answer: D

15.) A developer made another trigger that embeds a Task when another Lead is made. Subsequent to conveying to creation, an external joining is intermittently detailing blunders.
Which change should the designer make to guarantee the mix isn’t impacted with an insignificant effect on business rationale?

A. Eliminate the Apex Class from the Integration User’s Profile.
B. Utilize the Database technique with allOrNone set to False.
C. Utilize a Try/Catch block after the supplement explanation.
D. Deactivate the Trigger before the Integration runs.

Right Answer: C

16.) An environment has two Apex Triggers: an after-update trigger on Account and an after-update trigger on Contact. The Account after-update triggers flames at whatever point an Account’s location is refreshed, and it refreshes each related Contact with that location. The Contact after-update trigger flames on each alter, and it refreshes each Campaign Member record connected with the Contact with the Contact’s state.
Think about the accompanying: A mass update of 200 Account records’ locations, where each Account has 50 Contacts. Each Contact has 1 Campaign Member. This implies there are 10,000 Contact records across the Accounts and 10,000 Campaign Member records across the contacts.
What will happen when the mass update happens?

A. The mass update will fizzle, since the two trigger fire in a similar setting, subsequently surpassing the number of records handled by DML proclamations. Generally Voted
B. There will be no mistake since each trigger flames inside its own unique circumstance and each trigger doesn’t surpass the constraint of the number of records handled by DML proclamations.
C. There will be no mistake since the breaking point on the number of records handled by DML proclamations is 50,000.
D. The mass update of Account addresses will succeed, however, the Contact address updates will flop because of the surpassing number of records handled by DML proclamations.

Right Answer: B

17.) An organization has various unit test strategies that make Account records as a component of their informal arrangement. Another necessary field was added to the Account and presently all of the unit tests come up short.
What is the ideal way for a designer to fix the issue?

A. Add a preceding supplement trigger on Account to set the worth of the expected field.
B. Make a TestDataFactory class that fills in as the single spot to make Accounts for unit tests and set the expected field there.
C. Change the expected field to be an approval decision that rejects the System Administrator profile.
D. Add the expected field to the information arrangement for all of the unit tests.

Right Answer: B

18.) A client gets the nonexclusive “An inward server blunder has happened” while interfacing with a custom Lightning Component.
How should the designer guarantee a more significant message?

A. Add an onerror occasion controller to the tag.
B. Add a blunder view part to the markup.
C. Utilize an AuraHandledException in an attempt/get block.
D. Use ProcessBuilder to get the blunder.

Right Answer: C

19.) A custom Visualforce regulator calls the ApexPages.addMessage() technique, yet no messages are delivered on the page.
What part ought to be added to the Visualforce page to show the message?

A. <apex:pageMessages />
B. <apex:pageMessage severity=”info” />
C. <apex:facet name=”messages” />
D. <apex:message for=”info”/>

Right Answer: A

20.) A developer is composing code that requires making callouts to an outer web administration.
Which situation requires that the callout be made in a @future technique?

A. The callouts will be made in an Apex Trigger.
B. The callouts will be made in an Apex Test class.
C. Over 10 callouts will be made in a single transaction.
D. The callout could take longer than 60 seconds to complete.

Right Answer: A

Salesforce Platform Developer II Practice Test
Menu