Salesforce Certified Platform Developer II Certified Platform Developer II Exam Questions in PDF

Free Salesforce Certified Platform Developer II Dumps Questions (page: 10)

Business rules require a Contact to always be created when a new Account is created.
What can be used when developing a custom screen to ensure an Account is not created if the creation of the Contact fails?

  1. Use the Database.Delete method if the Contact insertion fails.
  2. Use the Database.Insert method with allOrNone set to False.
  3. Disable Validation rules on Contacts and set default values with a Trigger.
  4. Use setSavePoint() and rollback() with a try/catch block.

Answer(s): D



trigger AssignOwnerByRegion on Account ( before insert, before update )
{
List<Account> accountList = new List<Account>();
for( Account anAccount : trigger.new )
{
Region__c theRegion = [
SELECT Id, Name, Region_Manager__c
FROM Region__c
WHERE Name = :anAccount.Region_Name__c
];
anAccount.OwnerId = theRegion.Region_Manager__c;

accountList.add( anAccount );
}
update accountList;
}

Consider the above trigger intended to assign the Account to the manager of the Account’s region.
Which two changes should a developer make in this trigger to adhere to best practices? (Choose two.)

  1. Use a Map to cache the results of the Region c query by Id.
  2. Move the Region c query to outside the loop.
  3. Remove the last line updating accountList as it is not needed.
  4. Use a Map accountMap instead of List accountList.

Answer(s): B,C



Example 1:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId];
for (AggregateResult ar : groupedResults)
{
System.debug('Campaign ID' + ar.get('CampaignId'));
System.debug('Average amount' + ar.get('expr0'));
}

Example 2:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) theAverage FROM Opportunity GROUP BY CampaignId];
for (AggregateResult ar : groupedResults)
{
System.debug('Campaign ID' + ar.get('CampaignId'));
System.debug('Average amount' + ar.get('theAverage'));
}

Example 3:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) FROM Opportunity GROUP BY CampaignId];
for (AggregateResult ar : groupedResults)
{
System.debug('Campaign ID' + ar.get('CampaignId'));
System.debug('Average amount' + ar.get.AVG());
}

Example 4:
AggregateResult[] groupedResults = [SELECT CampaignId, AVG(Amount) theAverage FROM Opportunity GROUP BY CampaignId];
for (AggregateResult ar : groupedResults)
{
System.debug('Campaign ID' + ar.get('CampaignId'));
System.debug ('Average amount' + ar.theAverage);
}

Which two of the examples above have correct System.debug statements? (Choose two.)

  1. Example 1
  2. Example 2
  3. Example 3
  4. Example 4

Answer(s): A,B



Which method should be used to convert a Date to a String in the current user’s locale?

  1. Date.format
  2. String format
  3. String.valueOf
  4. Date.parse

Answer(s): A



A company has a custom object, Order c, that has a required, unique, external ID field called Order_Number c.

Which statement should be used to perform the DML necessary to insert new records and update existing records in a List of Order c records?

  1. upsert orders;
  2. upsert orders Order_Number c;
  3. merge orders Order_Number c;
  4. merge orders;

Answer(s): B



Share your comments for Salesforce Certified Platform Developer II exam with other users:

M
Mn8300
11/9/2023 8:53:00 AM

nice questions

N
Nico
4/23/2023 11:41:00 PM

my 3rd purcahse from this site. these exam dumps are helpful. very helpful.

C
Chere
9/15/2023 4:21:00 AM

found it good

T
Thembelani
5/30/2023 2:47:00 AM

excellent material

V
vinesh phale
9/11/2023 2:51:00 AM

very helpfull

B
Bhagiii
11/4/2023 7:04:00 AM

well explained.

R
Rahul
8/8/2023 9:40:00 PM

i need the pdf, please.

C
CW
7/11/2023 2:51:00 PM

a good source for exam preparation

A
Anchal
10/23/2023 4:01:00 PM

nice questions

J
J Nunes
9/29/2023 8:19:00 AM

i need ielts general training audio guide questions

A
Ananya
9/14/2023 5:16:00 AM

please make this content available

S
Swathi
6/4/2023 2:18:00 PM

content is good

L
Leo
7/29/2023 8:45:00 AM

latest dumps please

L
Laolu
2/15/2023 11:04:00 PM

aside from pdf the test engine software is helpful. the interface is user-friendly and intuitive, making it easy to navigate and find the questions.

Z
Zaynik
9/17/2023 5:36:00 AM

questions and options are correct, but the answers are wrong sometimes. so please check twice or refer some other platform for the right answer

M
Massam
6/11/2022 5:55:00 PM

90% of questions was there but i failed the exam, i marked the answers as per the guide but looks like they are not accurate , if not i would have passed the exam given that i saw about 45 of 50 questions from dump

A
Anonymous
12/27/2023 12:47:00 AM

answer to this question "what administrative safeguards should be implemented to protect the collected data while in use by manasa and her product management team? " it should be (c) for the following reasons: this administrative safeguard involves controlling access to collected data by ensuring that only individuals who need the data for their job responsibilities have access to it. this helps minimize the risk of unauthorized access and potential misuse of sensitive information. while other options such as (a) documenting data flows and (b) conducting a privacy impact assessment (pia) are important steps in data protection, implementing a "need to know" access policy directly addresses the issue of protecting data while in use by limiting access to those who require it for legitimate purposes. (d) is not directly related to safeguarding data during use; it focuses on data transfers and location.

J
Japles
5/23/2023 9:46:00 PM

password lockout being the correct answer for question 37 does not make sense. it should be geofencing.

F
Faritha
8/10/2023 6:00:00 PM

for question 4, the righr answer is :recover automatically from failures

A
Anonymous
9/14/2023 4:27:00 AM

question number 4s answer is 3, option c. i

P
p das
12/7/2023 11:41:00 PM

very good questions

A
Anna
1/5/2024 1:12:00 AM

i am confused about the answers to the questions. are the answers correct?

B
Bhavya
9/13/2023 10:15:00 AM

very usefull

R
Rahul Kumar
8/31/2023 12:30:00 PM

need certification.

D
Diran Ole
9/17/2023 5:15:00 PM

great exam prep

V
Venkata Subbarao Bandaru
6/24/2023 8:45:00 AM

i require dump

D
D
7/15/2023 1:38:00 AM

good morning, could you please upload this exam again,

A
Ann
9/15/2023 5:39:00 PM

hi can you please upload the dumps for sap contingent module. thanks

S
Sridhar
1/16/2024 9:19:00 PM

good questions

S
Summer
10/4/2023 9:57:00 PM

looking forward to the real exam

V
vv
12/2/2023 2:45:00 PM

good ones for exam preparation

D
Danny Zas
9/15/2023 4:45:00 AM

this is a good experience

S
SM 1211
10/12/2023 10:06:00 PM

hi everyone

A
A
10/2/2023 6:08:00 PM

waiting for the dump. please upload.

AI Tutor 👋 I’m here to help!