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:

S
SAM
12/4/2023 12:56:00 AM

explained answers

A
Andy
12/26/2023 9:35:00 PM

plan to take theaws certified developer - associate dva-c02 in the next few weeks

S
siva
5/17/2023 12:32:00 AM

very helpfull

M
mouna
9/27/2023 8:53:00 AM

good questions

B
Bhavya
9/12/2023 7:18:00 AM

help to practice csa exam

M
Malik
9/28/2023 1:09:00 PM

nice tip and well documented

R
rodrigo
6/22/2023 7:55:00 AM

i need the exam

D
Dan
6/29/2023 1:53:00 PM

please upload

A
Ale M
11/22/2023 6:38:00 PM

prepping for fsc exam

A
ahmad hassan
9/6/2023 3:26:00 AM

pd1 with great experience

Ž
Žarko
9/5/2023 3:35:00 AM

@t it seems like azure service bus message quesues could be the best solution

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

helpful to check your understanding.

D
Da Costa
8/27/2023 11:43:00 AM

question 128 the answer should be static not auto

B
bot
7/26/2023 6:45:00 PM

more comments here

K
Kaleemullah
12/31/2023 1:35:00 AM

great support to appear for exams

B
Bsmaind
8/20/2023 9:26:00 AM

useful dumps

B
Blessious Phiri
8/13/2023 8:37:00 AM

making progress

N
Nabla
9/17/2023 10:20:00 AM

q31 answer should be d i think

V
vladputin
7/20/2023 5:00:00 AM

is this real?

N
Nick W
9/29/2023 7:32:00 AM

q10: c and f are also true. q11: this is outdated. you no longer need ownership on a pipe to operate it

N
Naveed
8/28/2023 2:48:00 AM

good questions with simple explanation

C
cert
9/24/2023 4:53:00 PM

admin guide (windows) respond to malicious causality chains. when the cortex xdr agent identifies a remote network connection that attempts to perform malicious activity—such as encrypting endpoint files—the agent can automatically block the ip address to close all existing communication and block new connections from this ip address to the endpoint. when cortex xdrblocks an ip address per endpoint, that address remains blocked throughout all agent profiles and policies, including any host-firewall policy rules. you can view the list of all blocked ip addresses per endpoint from the action center, as well as unblock them to re-enable communication as appropriate. this module is supported with cortex xdr agent 7.3.0 and later. select the action mode to take when the cortex xdr agent detects remote malicious causality chains: enabled (default)—terminate connection and block ip address of the remote connection. disabled—do not block remote ip addresses. to allow specific and known s

Y
Yves
8/29/2023 8:46:00 PM

very inciting

M
Miguel
10/16/2023 11:18:00 AM

question 5, it seems a instead of d, because: - care plan = case - patient = person account - product = product2;

B
Byset
9/25/2023 12:49:00 AM

it look like real one

D
Debabrata Das
8/28/2023 8:42:00 AM

i am taking oracle fcc certification test next two days, pls share question dumps

N
nITA KALE
8/22/2023 1:57:00 AM

i need dumps

C
CV
9/9/2023 1:54:00 PM

its time to comptia sec+

S
SkepticReader
8/1/2023 8:51:00 AM

question 35 has an answer for a different question. i believe the answer is "a" because it shut off the firewall. "0" in registry data means that its false (aka off).

N
Nabin
10/16/2023 4:58:00 AM

helpful content

B
Blessious Phiri
8/15/2023 3:19:00 PM

oracle 19c is complex db

S
Sreenivas
10/24/2023 12:59:00 AM

helpful for practice

L
Liz
9/11/2022 11:27:00 PM

support team is fast and deeply knowledgeable. i appreciate that a lot.

N
Namrata
7/15/2023 2:22:00 AM

helpful questions

AI Tutor 👋 I’m here to help!