100% tevredenheidsgarantie Direct beschikbaar na betaling Zowel online als in PDF Je zit nergens aan vast
logo-home
PD1 Practice Exam Questions And Answers €10,64   In winkelwagen

Tentamen (uitwerkingen)

PD1 Practice Exam Questions And Answers

 8 keer bekeken  0 keer verkocht
  • Vak
  • PD1
  • Instelling
  • PD1

Which of the following are capabilities of Visual Studio Code?Choose 3 answers. A. Creating Change Sets B. Deploying metadata components from one org to another C. Running Apex Tests D. Create a test suite for running tests E. Executing SOQL queries - ANS B, C, E Visual Studio Cod...

[Meer zien]

Voorbeeld 3 van de 28  pagina's

  • 12 oktober 2024
  • 28
  • 2024/2025
  • Tentamen (uitwerkingen)
  • Vragen en antwoorden
  • PD1
  • PD1
avatar-seller
PD1 Practice Exam Questions And
Answers


Which of the following are capabilities of Visual Studio Code?Choose 3 answers.

A. Creating Change Sets
B. Deploying metadata components from one org to another
C. Running Apex Tests
D. Create a test suite for running tests
E. Executing SOQL queries - ANS B, C, E

Visual Studio Code can be used to:- Test and debug Apex classes and triggers.- Run
anonymous blocks of Apex on the server- Execute SOQL queries- Synchronize project contents
with changes on the server- Deploy metadata components from one Salesforce organization to
another
Creating change sets must be done through the Salesforce web UI of the org. Test suites can
only be created in the Developer Console.

https://trailhead.salesforce.com/en/content/learn/projects/quickstart-vscode-salesforce/start-vsc
ode

When test data cannot be created programmatically, how can pre-existing data be
accessed?Choose 1 answer.

A. Annotate the test method with [withSharing=true]
B. Annotate the test class or method with [seeAllData=true]
C. Annotate the test method with [withSharing=false]
D. Annotate the test class or method with [seeAllData=false] - ANS B

If the test class or test method is annotated with IsTest(SeeAllData=true) data access will be
opened to pre-existing records in the organization.

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_seeal
ldata_using.htm

A managed package can be created in which type of environment?Choose 2 answers.

A. Developer Sandbox

,B. Full Sandbox
C. Developer Edition
D. Partner Developer Edition - ANS Only Developer Edition or Partner Developer Edition
environments can create managed packages.

https://developer.salesforce.com/page/An_Introduction_to_Environments

A developer would like to relate an external data object (Social Media Posts) to the contacts
object in Salesforce to track every post the contact has made in the external platform. How can
the developer achieve this?Choose 1 answer.

A. Create a lookup relationship and update the record ID through integration
B. Create an indirect lookup relationship using a custom field with External ID and Unique
attributes
C. Create an external lookup relationship using a custom field with External ID and Unique
attributes
D. Create a master-detail relationship and update the record ID through integration - ANS
B

An indirect lookup relationship links a child external object to a parent standard or custom
object. When you create an indirect lookup relationship field on an external object, you specify
the parent object field and the child object field to match and associate records in the
relationship. Specifically, you select a custom unique, external ID field on the parent object to
match against the child's indirect lookup relationship field, whose values come from an external
data source.

An external lookup relationship generally relates a Salesforce child record to an external parent
record.Lookup relationships and master-detail relationships do not relate to external records.

https://help.salesforce.com/articleView?id=overview_of_custom_object_relationships.htm&langu
age=en_US&type=0&release=204.11.2

https://trailhead.salesforce.com/en/projects/quickstart-lightning-connect/steps/quickstart-lightnin
g-connect3

The Stage field on all related Opportunity records should be updated to 'Closed Lost' when the
value of the 'Status' field on an account record is changed to 'Inactive' by a sales user. What
could be used to meet this requirement?Choose 1 answer.

A. Workflow rule
B. Process Builder
C. Approval Process
D. Flow - ANS B

, Process Builder is capable of updating related records through the Update Records action type.

Although a flow is also capable of updating related records, the recommendation is to always go
with the solution that is easier to implement, which in this case is Process Builder. Workflow
rules cannot operate on child records of an object. Cross-object field updates are available for
an object's parent record only under certain conditions. An approval process cannot be used to
update child records.

https://help.salesforce.com/apex/HTViewHelpDoc?id=workflow_cross_object_field_updates.htm

The code snippet below throws an error during bulk data load. What is the root cause?Choose 1
answer.

for (Contact con : Trigger.new) {
if (con.PostalCode__c != null) {
List<State__c> states = [SELECT StateId__c, PostalCode__c From State__c WHERE
PostalCode__c = :con.PostalCode__c];
if (states.size() > 0) { con.StateId__c =states[0].StateId__c;
}
}
}

A. SOQL query is located inside the for loop code
B. No update DML over list of Contacts
C. Variable 'con' is not declared
D. Condition is invalid and will always be null - ANS A

There is a governor limit that enforces a maximum number of SOQL queries allowed in a single
transaction. To help avoid hitting the limit, queries inside for loops should be avoided. If a query
is needed, query once, retrieve all the necessary data in a single query, and then iterate over
the results. A SOQL for loop can also be used to automatically retrieve and return results in
batches of 200 records.

The variable 'con' is declared in the for-loop definition. The null check on the PostalCode field is
a valid condition. Absence of a DML operation does not throw an error. However, note that for
before triggers, a DML statement on the object that invoked the trigger will throw an
SObjectException. Also, a DML statement inside the for loop would potentially cause a DML
limit exception.

https://developer.salesforce.com/page/Apex_Code_Best_Practices

How can SOQL injection be prevented?Choose 1 answer.

A. Use the preventQuotes method

Voordelen van het kopen van samenvattingen bij Stuvia op een rij:

Verzekerd van kwaliteit door reviews

Verzekerd van kwaliteit door reviews

Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!

Snel en makkelijk kopen

Snel en makkelijk kopen

Je betaalt supersnel en eenmalig met iDeal, creditcard of Stuvia-tegoed voor de samenvatting. Zonder lidmaatschap.

Focus op de essentie

Focus op de essentie

Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper DocLaura. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor €10,64. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 77254 samenvattingen verkocht

Opgericht in 2010, al 14 jaar dé plek om samenvattingen te kopen

Start met verkopen
€10,64
  • (0)
  Kopen