Salesforce Certified Platform Developer II Certified Platform Developer II Dumps in PDF

Free Salesforce Certified Platform Developer II Real 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:

A
Angel
8/30/2023 10:58:00 PM

i think you have the answers wrong regarding question: "what are three core principles of web content accessibility guidelines (wcag)? answer: robust, operable, understandable

S
SH
5/16/2023 1:43:00 PM

these questions are not valid , they dont come for the exam now

S
sudhagar
9/6/2023 3:02:00 PM

question looks valid

V
Van
11/24/2023 4:02:00 AM

good for practice

D
Divya
8/2/2023 6:54:00 AM

need more q&a to go ahead

R
Rakesh
10/6/2023 3:06:00 AM

question 59 - a newly-created role is not assigned to any user, nor granted to any other role. answer is b https://docs.snowflake.com/en/user-guide/security-access-control-overview

N
Nik
11/10/2023 4:57:00 AM

just passed my exam today. i saw all of these questions in my text today. so i can confirm this is a valid dump.

D
Deep
6/12/2023 7:22:00 AM

needed dumps

T
tumz
1/16/2024 10:30:00 AM

very helpful

N
NRI
8/27/2023 10:05:00 AM

will post once the exam is finished

K
kent
11/3/2023 10:45:00 AM

relevant questions

Q
Qasim
6/11/2022 9:43:00 AM

just clear exam on 10/06/2202 dumps is valid all questions are came same in dumps only 2 new questions total 46 questions 1 case study with 5 question no lab/simulation in my exam please check the answers best of luck

C
Cath
10/10/2023 10:09:00 AM

q.112 - correct answer is c - the event registry is a module that provides event definitions. answer a - not correct as it is the definition of event log

S
Shiji
10/15/2023 1:31:00 PM

good and useful.

A
Ade
6/25/2023 1:14:00 PM

good questions

P
Praveen P
11/8/2023 5:18:00 AM

good content

A
Anastasiia
12/28/2023 9:06:00 AM

totally not correct answers. 21. you have one gcp account running in your default region and zone and another account running in a non-default region and zone. you want to start a new compute engine instance in these two google cloud platform accounts using the command line interface. what should you do? correct: create two configurations using gcloud config configurations create [name]. run gcloud config configurations activate [name] to switch between accounts when running the commands to start the compute engine instances.

P
Priyanka
7/24/2023 2:26:00 AM

kindly upload the dumps

N
Nabeel
7/25/2023 4:11:00 PM

still learning

G
gure
7/26/2023 5:10:00 PM

excellent way to learn

C
ciken
8/24/2023 2:55:00 PM

help so much

B
Biswa
11/20/2023 9:28:00 AM

understand sql col.

S
Saint Pierre
10/24/2023 6:21:00 AM

i would give 5 stars to this website as i studied for az-800 exam from here. it has all the relevant material available for preparation. i got 890/1000 on the test.

R
Rose
7/24/2023 2:16:00 PM

this is nice.

A
anon
10/15/2023 12:21:00 PM

q55- the ridac workflow can be modified using flow designer, correct answer is d not a

N
NanoTek3
6/13/2022 10:44:00 PM

by far this is the most accurate exam dumps i have ever purchased. all questions are in the exam. i saw almost 90% of the questions word by word.

E
eriy
11/9/2023 5:12:00 AM

i cleared the az-104 exam by scoring 930/1000 on the exam. it was all possible due to this platform as it provides premium quality service. thank you!

M
Muhammad Rawish Siddiqui
12/8/2023 8:12:00 PM

question # 232: accessibility, privacy, and innovation are not data quality dimensions.

V
Venkat
12/27/2023 9:04:00 AM

looks wrong answer for 443 question, please check and update

V
Varun
10/29/2023 9:11:00 PM

great question

D
Doc
10/29/2023 9:36:00 PM

question: a user wants to start a recruiting posting job posting. what must occur before the posting process can begin? 3 ans: comment- option e is incorrect reason: as part of enablement steps, sap recommends that to be able to post jobs to a job board, a user need to have the correct permission and secondly, be associated with one posting profile at minimum

I
It‘s not A
9/17/2023 5:31:00 PM

answer to question 72 is d [sys_user_role]

I
indira m
8/14/2023 12:15:00 PM

please provide the pdf

R
ribrahim
8/1/2023 6:05:00 AM

hey guys, just to let you all know that i cleared my 312-38 today within 1 hr with 100 questions and passed. thank you so much brain-dumps.net all the questions that ive studied in this dump came out exactly the same word for word "verbatim". you rock brain-dumps.net!!! section name total score gained score network perimeter protection 16 11 incident response 10 8 enterprise virtual, cloud, and wireless network protection 12 8 application and data protection 13 10 network défense management 10 9 endpoint protection 15 12 incident d

AI Tutor 👋 I’m here to help!