option
Cuestiones
ayuda
daypo
buscar.php

PD1 3-2

COMENTARIOS ESTADÍSTICAS RÉCORDS
REALIZAR TEST
Título del Test:
PD1 3-2

Descripción:
GOGOGO1

Fecha de Creación: 2023/06/18

Categoría: Otros

Número Preguntas: 50

Valoración:(0)
COMPARTE EL TEST
Nuevo ComentarioNuevo Comentario
Comentarios
NO HAY REGISTROS
Temario:

Refer to the following code snippet for an environment has more than 200 Accounts belonging to the ‘Technology’ industry: for(Account thisAccount : [Select id, Industry FROM Account LIMIT 150]){ if(thisAccount.Insdustry == 'Technology'){ thisAccount.Is_Tech__c = true; } update thisAccount; } When the code executes, what happens as a result of the Apex transaction?. A. The Apex transaction succeeds regardless of any uncaught exception and all processed accounts are updated. B. If executed in a synchronous context, the Apex transaction is likely to fail by exceeding the DML governor limit. C. The Apex transaction fails with the following message: SObject row was retrieved via SOQL without querying the requested field: Account.Is_Tech__c. D. If executed in an asynchronous context, the Apex transaction is likely to fail by exceeding the DML governor limit.

A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of tests allowing them to test independent requirements various types of Salesforce Cases. Which approach can efficiently generate the required data for each unit test?. A. Create a mock using the Stub API. B. Use @TestSetup with a void method. C. Add @IsTest(seeAllData=true) at the start of the unit test class. D. Create test data before Test.startTest() in the unit test.

A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to verify the current user’s default Opportunity record type, and set certain default values based on the record type before inserting the record. How can the developer find the current user’s default record type?. A. Use the Schema.userInfo.Opportunity.getDefaultRecordType() method. B. Query the Profile where the ID equals userInfo.getProfileID() and then use the profile.Opportunity.getDefaultRecordType() method. C. Create the opportunity and check the opportunity.recordType, which will have the record ID of the current user’s default record type, before inserting. D. Use Opportunity.SObjectType.getDescribe().getRecordTypeInfos() to get a list of record types, and iterate through them until isDefaultRecordTypeMapping() is true.

What can be developed using the Lightning Component framework?. A. Salesforce integrations. B. Salesforce Classic and Lightning user interface pages. C. Hosted web applications. D. Single-page web apps.

A developer created a new after insert trigger on the Lead object that creates Task records for each Lead. After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart. Which change should the developer make to allow the integration to continue when some records in a batch cause failures due to the Task insert statement, so that manual restarts are not needed?. A. Deactivate the trigger before the integration runs. B. Use a try-catch block after the insert statement. C. Use the Database method with allOrNone set to false. D. Remove the Apex class from the integration user’s profile.

Which annotation exposes an Apex class as a RESTful web service?. A. @RemoteAction. B. @RestResource. C. @HttpInvocable. D. @AuraEnabled.

A developer created these three roll-up summary fields on the custom object, Project__c: Total_Timesheets__c - Total_Approved_Timesheets__c - Total_Rejected_Timesheet__c - The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project. What are two benefits of choosing a formula field instead of an Apex trigger to fulfill the request? (Choose two.). A. A test class will validate the formula field during deployment. B. A formula field will trigger existing automation when deployed. C. Using a formula field reduces maintenance overhead. D. A formula field will calculate the value retroactively for existing records.

A custom Visualforce controller calls the ApexPages.addMessage() method, but no messages are rendering on the page. Which component should be added to the Visualforce page to display the message?. A. <apex:pageMessages />. B. <apex:facet name="messages" />. C. <apex:pageMessage severity="info" />. D. <apex:message for="info"/>.

In the following example, which sharing context myMethod execute when it is invoked? public Class myClass { public void myMethod() { /* implementation */ } }. A. Sharing rules will not be enforced for the running user. B. Sharing rules will be inherited from the calling context. C. Sharing rules will be enforced for the running user. D. Sharing rules will be enforced by the instantiating class.

A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors. What is the correct definition of the Apex method?. A. @InvocableMethod global static List> getLevel(List input) { /*implementation*/ }. B. @InvocableMethod global Recommendation getLevel(ContactWrapper input) { /*implementation*/ }. C. @InvocableMethod global List> getLevel(List input) { /*implementation*/ }. D. @InvocableMethod global static ListRecommendation getLevel(List input) { /*implementation*/ }.

Which three Salesforce resources can be accessed from a Lightning web component? (Choose three.). A. All external libraries. B. Static resources. C. Third-party web components. D. Content asset files. E. SVG resources.

An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship. How can this be achieved?. A. Write a Process Builder that links the custom object to the Opportunity. B. Use the Streaming API to create real-time roll-up summaries. C. Write a trigger on the child object and use a red-black tree sorting to sum the amount for all related child objects under the Opportunity. D. Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity.

What is the result of the following code? Account a = new Account (); Database.insert (a, false);. A. The record will be created and no error will be reported. B. The record will not be created and no error will be reported. C. The record will be created and a message will be in the debug log. D. The record will not be created and an exception will be thrown.

What should a developer do to check the code coverage of a class after running all tests?. A. Select and run the class on the Apex Test Execution page in the Developer Console. B. View the code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab. C. View the Code Coverage column in the list view on the Apex Classes page. D. View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup.

Universal Containers decides to use exclusively declarative development to build out a new Salesforce application. Which three options should be used to build out the database layer for the application? (Choose three.). A. Process Builder. B. Roll-up summaries. C. Triggers. D. Relationships. E. Custom objects and fields.

What are two ways that a controller and extension can be specified for a custom object named “Notice” on a Visualforce page? (Choose two.). A. apex:page standardController=”Notice__c” extensions=”myControllerExtension”. B. apex:page=Notice extends=”myControllerExtension”. C. apex:page controller=”Notice__c” extensions=”myControllerExtension”. D. apex:page controllers=”Notice__c, myControllerExtension”.

Given the following trigger implementation: trigger leadTrigger on Lead before(before update){ final ID BUSINESS_RECORDTYPE_ID = '05496506656QAD'; for(Lead thisLead : Trigger.new){ if(thisLead.Company != null && thisLead.RecordTypeId != BUSINESS_RECORDTYPE_ID){ thisLead.RecordTypeId = BUSINESS_RECORDTYPE_ID; } } } The developer receives deployment errors every time a deployment is attempted from a sandbox to Production. What should the developer do to ensure a successful deployment?. A. Ensure a record type with an ID of BUSINESS_RECORDTYPEID exists on Production prior to deployment. B. Ensure BUSINESS_RECORDTYPEID is pushed as part of the deployment components. C. Ensure BUSINESS_RECORDTYPEID is retrieved using Schema.Describe calls. D. Ensure the deployment is validated by a System Admin user on Production.

Which statement describes the execution order when triggers are associated to the same object and event?. A. Triggers are executed in the order they are modified. B. Triggers are executed alphabetically by trigger name. C. Trigger execution order cannot be guaranteed. D. Triggers are executed in the order they are created.

A developer wants to mark each Account in a List as either Active or Inactive, based on the value in the LastModifiedDate field of each Account being greater than 90 days in the past. Which Apex technique should the developer use?. A. A for loop, with a switch statement inside. B. A switch statement, with a for loop inside. C. An if-else statement, with a for loop inside. D. A for loop, with an if-else statement inside.

A developer has a requirement to write Apex code to update a large number of account records on a nightly basis. The system administrator needs to be able to schedule the class to run after business hours on an as-needed basis. Which class definition should be used to successfully implement this requirement?. A. global inherited sharing class ProcessAccountProcessor implements Database.Batchable, Schedulable. B. global inherited sharing class ProcessAccountProcessor implements Schedulable. C. global inherited sharing class ProcessAccountProcesscr implements Database.Batchable. D. global inherited sharing class ProcessAccountProcessor implements Queueable.

Universal Containers has a support process that allows users to request support from its engineering team using a custom object, Engineering_Support__c. Users should be able to associate multiple Engineering_Support__c records to a single Opportunity record. Additionally, aggregate information about the Engineering_Support__c records should be shown on the Opportunity record. What should a developer implement to support these requirements?. A. Master-detail field from Opportunity to Engineering_Support__c. B. Lookup field from Engineering_Support__c to Opportunity. C. Lookup field from Opportunity to Engineering_Support__c. D. Master-detail field from Engineering_Support__c to Opportunity.

AW Computing tracks order information in custom objects called Order__c and Order_Line__c. Currently, all shipping information is stored in the Order__c object. The company wants to expand its order application to support split shipments so that any number of Order_Line__c records on a single Order__c can be shipped to different locations. What should a developer add to fulfill this requirement?. A. Order_Shipment_Group__c object and master-detail field on Order__c. B. Order_Shipment_Group__c object and master-detail fields to Order__c and Order_Line__c. C. Order_Shipment_Group__c object and master-detail field on Order_Line__c. D. Order_Shipment_Group__c object and master-detail field on Order_Shipment_Group__c.

Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won stage. Which two strategies can a developer use to accomplish this? (Choose two.). A. Use an after-save flow. B. Use a validation rule. C. Use the Process Automation Settings. D. Use a trigger.

A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost if the lost reason is blank. Which automation allows the developer to satisfy this requirement in the most efficient manner?. A. An error condition formula on a validation rule on Opportunity. B. An Apex trigger on the Opportunity object. C. A record trigger flow on the Opportunity object. D. An approval process on the Opportunity object.

A developer is migrating a Visualforce page into a Lightning web component. The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data. Which security consideration should the developer be aware of?. A. The with sharing keyword must be used to enforce sharing rules. B. Lightning Data Service handles sharing rules and field-level security. C. The isAccessible() method must be used for field-level access checks. D. Lightning Data Service ignores field-level security.

Universal Containers uses Service Cloud with a custom field, Stage__c, on the Case object. Management wants to send a follow-up email reminder 6 hours after the Stage__c field is set to "Waiting on Customer". The Salesforce Administrator wants to ensure the solution used is bulk safe. Which automation tool should a developer recommend to meet these business requirements?. A. Record-Triggered Flow. B. Entitlement Process. C. Einstein Next Best Action. D. Scheduled Flow.

An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship. How can this be achieved?. A. Use the Metadata API to create real-time roll-up summaries. B. Use the Streaming API to create real-time roll-up summaries. C. Write a trigger on the Opportunity object and use tree sorting to sum the amount for all related child objects under the Opportunity. D. Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity.

A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles. Which two tools can they use to run a script that deploys to a sandbox? (Choose two.). A. SFDX CLI. B. Developer Console. C. Change Sets. D. Ant Migration Tool.

A developer must provide custom user interfaces when users edit a Contact in either Salesforce Classic or Lightning Experience. What should the developer use to override the Contact's Edit button and provide this functionality?. A. A Lightning page in Salesforce Classic and a Visualforce page in Lightning Experience. B. A Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience. C. A Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience. D. A Lightning component in Salesforce Classic and a Lightning component in Lightning Experience.

A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component. In which two ways can this be accomplished? (Choose two.). A. The parent component can use a custom event to pass the data to the child component. B. The parent component can invoke a method in the child component. C. The parent component can use a public property to pass the data to the child component. D. The parent component can use the Apex controller class to send data to the child component.

Cloud Kicks has a multi-screen flow that its call center agents use when handling inbound service desk calls. At one of the steps in the flow, the agents should be presented with a list of order numbers and dates that are retrieved from an external order management system in real time and displayed on the screen. What should a developer use to satisfy this requirement?. A. An Apex REST class. B. An Apex controller. C. An outbound message. D. An invocable method.

A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Within the class, the developer identifies the following method as a security threat: List<Contact> perfomSearch(String lastname){ return Database.query('SELECT ID, FIRSTNAME, LASTNAME FROM CONTACT WHERE LASTNAME LIKE %'+lastname+'%'); } What are two ways the developer can update the method to prevent a SOQL injection attack? (Choose two.). A. Use the @ReadOnly annotation and the with sharing keyword on the class. B. Use the escapeSingleQuotes method to sanitize the parameter before its use. C. Use a regular expression expression on the parameter to remove special characters. D. Use variable binding and replace the dynamic query with a static SOQL.

Which Apex class contains methods to return the amount of resources that have been used for a particular governor, such as the number of DML statements?. A. Exception. B. Messaging. C. OrgLimits. D. Limits.

A developer has the following requirements: • Calculate the total amount on an Order. • Calculate the line amount for each Line Item based on quantity selected and price. • Move Line Items to a different Order if a Line Item is not in stock. Which relationship implementation supports these requirements on its own?. A. Order has a re-parentable master-detail field to Line Item. B. Order has a re-parentable lookup field to Line Item. C. Line Item has a re-parentable lookup field to Order. D. Line Item has a re-parentable master-detail field to Order.

A developer completed modifications to a customized feature that is comprised of two elements: • Apex trigger • Trigger handler Apex class What are two factors that the developer must take into account to properly deploy the modification to the production environment? (Choose two.). A. Apex classes must have at least 75% code coverage org-wide. B. At least one line of code must be executed for the Apex trigger. C. All methods in the test classes must use @isTest. D. Test methods must be declared with the testMethod keyword.

A lead developer creates an Apex interface called Laptop. Consider the following code snippet: public class SilverLaptop{ //code implementation } How can a developer use the Laptop interface within the SilverLaptop class?. A. public class SilverLaptop implements Laptop. B. @Extends(class="Laptop") public class SilverLaptop. C. public class SilverLaptop extends Laptop. D. @Interface(class="Laptop") public class SilverLaptop.

A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an OrderItem object that has a master-detail relationship to Order. During order processing, an order may be split into multiple orders. What should a developer do to allow their code to move some existing OrderItem records to a new Order record?. A. Select the Allow reparenting option on the master-detail relationship. B. Change the master-detail relationship to an external lookup relationship. C. Add without sharing to the Apex class declaration. D. Create a junction object between OrderItem and Order.

Management asked for opportunities to be automatically created for accounts with annual revenue greater than $1,000,000. A developer created the following trigger on the Account object to satisfy this requirement. for(Account a : Trigger.new){ if(a.AnnualRevenue > 1000000){ List<Opportunity> oppList = [SELECT ID FROM OPPORTUNITY WHERE ACCOUNTID = :a.Id]; if(oppList.size() == 0){ Opportunity oppty = new Opportunity(Name = a.Name, StageName = 'Prospecting', CloseDate = System.today().addDays(30)); insert oppty; } } } Users are able to update the account records via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, it fails with System.Exception errors. Which two actions should the developer take to fix the code segment shown above? (Choose two.). A. Check if all the required fields for Opportunity are being added on creation. B. Use Database.query to query the opportunities. C. Move the DML that saves opportunities outside the for loop. D. Query for existing opportunities outside the for loop.

Which scenario is valid for execution by unit tests?. A. Load data from a remote site with a callout. B. Execute anonymous Apex as a different user. C. Set the created date of a record using a system method. D. Generate a Visualforce PDF with getContentAsPDF().

When a user edits the Postal Code on an Account, a custom Account text field named "Timezone" must be updated based on the values in another custom object called PostalCodeToTimezone__c. What is the optimal way to implement this feature?. A. Build an account assignment rule. B. Build a flow with Flow Builder. C. Create an account approval process. D. Create a formula field.

A company has been adding data to Salesforce and has not done a good job of limiting the creation of duplicate Lead records. The developer is considering writing an Apex process to identify duplicates and merge the records together. Which two statements are valid considerations when using merge? (Choose two.). A. The merge method allows up to three records, including the master and two additional records with the same sObject type, to be merged into the master record. B. Merge is supported with accounts, contacts, cases, and leads. C. External ID fields can be used with the merge method. D. The field values on the master record are overwritten by the records being merged.

What can be used to override the Account's standard Edit button for Lightning Experience?. A. Lightning action. B. Lightning flow. C. Lightning page. D. Lightning component.

What are two use cases for executing Anonymous Apex code? (Choose two.). A. To run a batch Apex class to update all Contacts. B. To schedule an Apex class to run periodically. C. To delete 15,000 inactive Accounts in a single transaction after a deployment. D. To add unit test code coverage to an org.

A Salesforce Administrator used Flow Builder to create a flow named "accountOnboarding". The flow must be used inside an Aura component. Which tag should a developer use to display the flow in the component?. A. lightning-flow. B. aura-flow. C. lightning:flow. D. aura:flow.

Which two sfdx commands can be used to add testing data to a Developer sandbox? (Choose two.). A. force:data:async:upsert. B. force:data:tree:import. C. force:data:bulk:upsert. D. force:data:object:create.

A custom object Trainer__c has a lookup field to another custom object Gym__c. Which SOQL query will get the record for the Viridian City Gym and all its trainers?. A. SELECT ID FROM Trainer__c WHERE Gym__r.Name = 'Viridian City Gym'. B. SELECT Id, (SELECT Id FROM Trainers__c) FROM Gym__c WHERE Name = 'Viridian City Gym'. C. SELECT Id, (SELECT Id FROM Trainer__c) FROM Gym__c WHERE Name = 'Viridian City Gym'. D. SELECT Id, (SELECT Id FROM Trainers__r) FROM Gym__c WHERE Name = 'Viridian City Gym'.

Which two settings must be defined in order to update a record of a junction object? (Choose two.). A. Read/Write access on the junction object. B. Read access on the primary relationship. C. Read/Write access on the primary relationship. D. Read/Write access on the secondary relationship.

A developer is integrating with a legacy on-premise SQL database. What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?. A. Formula field. B. Lookup field. C. External ID field. D. External Object.

What should a developer use to script the deployment and unit test execution as part of continuous integration?. A. Developer Console. B. Salesforce CLI. C. VS Code. D. Execute Anonymous.

Where are two locations a developer can look to find information about the status of batch or future calls? (Choose two.). A. Developer Console. B. Apex Flex Queue. C. Apex Jobs. D. Paused Flow Interviews component.

Denunciar Test