pd1set2
![]() |
![]() |
![]() |
Title of test:![]() pd1set2 Description: pd1set2 test for test |




New Comment |
---|
NO RECORDS |
60 of 60. Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support representative name. What is the best solution to assign the case to the appropriate support representative?. A. Use a trigger an the Case object. B. Use a formula field on the case object. C. Use a validation rule on the Case object. D. Use an Assignment Flow element. What is a benefit of developing applications in a multi-tenant environment?. Access to predefined computing resources. Enforced best practices for development. C. Unlimited processing power and memory. D. Default out-of-the-box configuration. 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?. Build an account assignment rule. B. Build a flow with Flow Builder. C. Create an account approval process. D. Create a formula field. 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. A developer at AW Computing is tasked to create the supporting test class for a programmatic customization that leverages records stored within the custom object, Pricing_Structure__c. AW Computing has a complex pricing structure for each item on the store, spanning more than 500 records. Which two approaches can the developer use to ensure Pricing_Structure__c records are available when the test class is executed? (Choose two.). A. Use the Test.loadTest() method. B. Use the @IsTest(SeeAllData=true) annotation. C. Use a Test Data Factory class. D. Use without sharing on the class declaration. What is the result of the following code snippet? Public void dowork (Account acct){ For (Integer i=0; i<=200; i++) { Insert acct; } }. 0 accounts are created. 1 account. 200 account. 201 accounts. When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?. Production. B. Environment Hub. C. Dev Hub. D. Sandbox. 52 of 60. 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 for various types of Salesforce Cases. Which approach can efficiently generate the required data for each unit test?. Use @TestSetup with a viod method. Create test data before Test.startTest() in the unit test. Add @isTest(seeAllData=true) at the start of the unit test class. Create a nock using the Stud API. Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?. List <sObject> searchList = (FIND '*ACME*' IN ALL FIELDS RETURNING Contact, Lead);. List<List <sObject>> searchList = (FIND '*ACME*' IN ALL FIELDS RETURNING Contact, Lead);. Map <sObject> searchList = (FIND '*ACME*' IN ALL FIELDS RETURNING Contact, Lead);. List<List < sObject>> searchList = (SELECT Name, ID FROM Contact, Lead WHERE Name like '%ACME%');. A developer must create a Lightning component that allows users to input Contact record information to create a Contact record, including a Salary__c custom field. What should the developer use, along with a lightning-record-edit-form, so that Salary__c field functions as a currency input and is only viewable and editable by users that have the correct field level permissions on Salary__c?. ligthning-input-field field-name='Salary__c'> </lightning-input-field>. <lightning-formatted-number value='Salary__c' format-style='currency'> </lightning-formatted-number>. <lightning-input type='number' value='Salary__c' formatter='currency'> </lightning-input>. <lightning-input-currency value='Salary__c'> </lightning-input-currency>. dsd. What can be easily developed using the Lightning Component framework. Salesforce integrations. Salesforce Classic and Lightning user interface pages. Hosted web applications. Single-page web apps. 48 of 60. While writing an Apex class, a developer wants to make sure that all functionality being developed is handled as specified by the requirements. Which approach should the developer use to be sure that the Apex class is working according to specifications?. Include a savepoint and Database. rollback (). Run the code in an Execute Anonymous block in the Developer Console. Create a test class to execute the business logic and run the test in the Developer Console. Include a try/catch block to the Apex class. 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?. 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. Write a Process Builder that links the custom object to the Opportunity. Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity. Use the Streaming API to create real-time roll-up summaries. Universal Containers wants to assess the advantages of declarative development versus programmatic customization for specific use cases in its Salesforce implementation. What are two characteristics of declarative development over programmatic customization? (Choose two.). Declarative development does not require Apex test classes. Declarative development can be done using the Setup menu. Declarative code logic does not require maintenance or review. Declarative development has higher design limits and query limits. 45 of 60. A developer wants to mark each Account in a List<Account> as either Active or Inactive, based on the value in the LastModifiedDate field of each Accou being greater than 90 days in the past. Which Apex technique should the developer use?. A for loop, with a switch statement inside. An If/else statement, with a for loop inside. A Switch statement, with a for loop inside. A for loop, with an if/else statement inside. 44 of 60. How does the Lightning Component framework help developers implement solutions faster?. By providing device-awareness for mobile and desktops. By providing an Agile process with default steps. By providing change history and version control. By providing code review standards and processes. 43 of 60. 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 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?. Change the master-detail relationship to an external lookup relationship. Create a junction object between Orderltem and Order. Add without sharing to the Apex class declaration. Select the Allow reparenting option on the master-detail relationship. 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?. public calss SilverLaptop extends Laptop. @Interface (class=''Laptop'') public class SilverLaptop. public class Silverlaptop implements Laptop. @Extends(class=Laptop'') public class SilverLaptop. 41 of 60. A developer wrote Apex code that calls out to an external system using REST API. How should a developer write the test to prove the code is working as intended?. Write a class that extends WebServiceMock. Write a class that implements HTTPCalloutMock. Write a class that extends HTTPCalloutMock. Write a class that implements WebServiceMock. 40 of 60. Universal Containers (UC) is developing a process for their sales teams that requires all sales reps to through a set of scripted steps with each new customer they create. In the first step of collecting information, UC's ERP system must be checked via a REST endpoint to see if the customer exists. If the customer exists, the data must be presented to the sales rep in Salesforce. Which two should a developer implement to satisfy the requirements?. A. Trigger. B. Flow. C. Invocable method. D. Future method. A developer must provide a custom user interfaces when users edit a Contact in either Salesforce Classic or Lightning Experience. What should the developer do to provide this functionality. Vf page in salesforce classic lightning component in lightning experience. Vf page in salesforce classic lightning page in lightning experience. A lightning page in sf classic and vf page in lightning experience. A lightning component in sf classic and lightning component in lightning experience. What should a developer use to script the development and unit test execution as part of continuous integration?. Salesforce CLI. Developer console. Execute Anonymous. VS code. A developer considers the following snippet of code: Boolean isOK; integer x; String theString = 'Hello'; if (isOK == false && theString == 'Hello') { x = 1; } else if (isOK == true && theString =='Hello') { x = 2; } else if (isOK != null && theString == 'Hello') { x = 3; } else { x = 4; } Based on this code, what is the value of x?. 3. 2. 1. 4. A PrimaryId_e custom field exists on the Candidate_e custom object. The field is used to store each candidate's id number and is marked as Unique in th schema definition. As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate's primary id as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system. Which technique should the developer implement to streamline the data upload?. Create a Process Builder on the Candidate_c object to map the records. Create a before Insert trigger to correctly map the records. Update the primaryid__c field definition to mark it as an External Id. Upload the CSV into a custom object related to Candidate_c. Considering the following code snippet:public static void insertAccounts(List<Account> theseAccounts){for (Account ThisAccount : theseAccounts){if (this.Account.website == null){thisAccount.website='https://www.demo.com';}}update theseAccounts;}When the code executes, a DML exception is thrown.How should the developer modify the code to ensure exceptions are handled gracefully?. Implement the upsert: DML statement. Implement Change Data Capture. Implement a try/catch block for the DML. Remove null items from the list of Accounts. A development team wants to use a deployment script to automatically deploy to a sandbox during the development cycles. Which two tools can they use to run a script that deploys to a sandbox? Choose 2 answers. Developer Console. Ant Migration Tool. SFDX CLI. Change Sets. How many Accounts will be inserted by the following block of code? for (Integer i = 0; i < 500; i++) { Account a = new Account (Name='New Account + 1); insert a; }. 0. 150. 500. 100. 32 of 60. The Job Application_e custom object has a field that is a master-deta relationship to the Contact object, where the Contact object is the master. As part of a feature implementation, a developer needs to retrieve a list containing Contact records where the related Account Industry is 'Technology', while also retrieving the Contact's Job Application c records. Based on the object's relationships, what is the most efficient statement to retrieve the list of Contacts?. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Account.Industry = 'Technology'];. [SELECT Id, (SELECT Id FROM Job_Applications_r) FROM Contact WHERE Accounts.Industry = 'Technology'];. [SELECT Id, (SELECT Id FROM Job_Applications_c) FROM Contact WHERE Accounts.Industry = 'Technology'];. [SELECT Id, (SELECT Id FROM Job_Application_c) FROM Contact WHERE Account.Industry = 'Technology'];. 31 of 60. A developer must implement a CheckPayment Processor class that provides check processing payment capabilities that adhere to what is defined for payments in the Payment Processor interface. public interface Payment Processor ( void pay (Decimal amount); } Which implementation is correct to use the Payment. Processor interface class?. public class CheckPaymentProcessor implements PaymentProcessor { public void pay(Decimal amount);. public class CheckPaymentProcessor implements PaymentProcessor { public void pay(Decimal amount){}. public class CheckPaymentProcessor extends PaymentProcessor { public void pay(Decimal amount){}. public class CheckPaymentProcessor extends PaymentProcessor { public void pay(Decimal amount);. A developer deployed a trigger to update the status__c of Assets related to an Account when the Account's status changes and a nightly integration that updates Accounts in bulk has started to fail with limit failures. trigger AccountTrigger on Account(after update) ( List<Asset> assetsToUpdate = new List<Asset>(); for (Account newA: Trigger.new) { Account oldA = Trigger.oldMap.get(newA.Id); if (oldA.Status_c != newA.Status_c) ( assetsToUpdate.addAll( AccountHelper.getAscle } update assetsToUpdate: } public class AccountHelper ( public static List<Asset> getAssetsToUpdate (Account acct) List<Asset> assetsToUpdate = new List<Asset>(); FROM Asset WHERE AccountId = :acct.Id]){ isst.Status_c != acct.Status_c) ( { asst.Status_c = acct. Status_c; assetsToUpdate.add(asst); } } return assetsToUpdate: } } What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?. Change the getAssetsToUpdate= method to process all Accounts in one call and call it outside of the for loop that starts on line 03. Move all of the logic to a Queueable class that queries for and updates the Assets and call it from the trigger. Add a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an Account. Add List<Asset> assets = [SELECT Id, Status__c FROM Asset WHERE AccountId = :acctId] to line 14 and iterate over the assets list in the for loop on line 15. 29 of 60. A developer must write an Apex method that will be called from a Lightning component. The method may delete an Account stored in the account Rec variable. Which method should a developer use to ensure only users that should be able to delete Accounts can successfully perform deletions?. Schema.sObjectType.Account.isDeletable(). Account.isDeletable(). accountRec.isDeletable(). accountRec.sObjectType.isDeletable(). 28 of 60. A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations. In this implementation scenario, which two options are part of the Controller according to the MVC architecture Choose 2. Javascript file. XML file. Apex class. HTML File. 27 of 60. A developer writes a trigger on the Account object on the before update event that increments a count field. A record triggered flow also increments the cou field every time that an Account is created or updated. What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?. 2. 3. 4. 1. 26 of 60. Universal Containers (UC) uses out-of-the-box order management, that has a Master-Detail relationship between Order and Order Line Item. UC stores the availability date on each Order Line Item and Orders are only shipped when all of the Order Line Items are available. Which method should be used to calculate the estimated ship date for an Order?. Use a LATEST formula on each of the latest availability date fields. Use a DAYS formula on each of the availability date fields and a COUNT roll up on summary field. Use a MAX Roll-Up Summary field on the latest availability date fields. Use a CEILING formula on each of the latest availability date fields. When importing and exporting data into Salesforce, which two statements are true?Choose 2 answers. Bulk API can be used to import large data volumes in development environments without bypassing the storage limits. Data import wizard is an application that is installed on your computer. Bulk API can be used to bypass the storage limits when importing large data volumes in development environments. Developer and Developer Pro sandboxes have different storage limits. 24 of 60. Which three code lines are required to create a Lightning component on a Visualforce page?. $Lightning.useComponent. <apex:includeLightning/>. $Lightning.use. $Lightning.createComponent. <apex:slds/>. 23 of 60. Which two statements are true about using the @testSetup annotation in an Apex test class?. The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is used. Records created in the test setup method cannot be updated in individual test methods. A method defined with the @testSetup annotation executes once for each test method in the test class and counts towards system limits. In a test setup method, test data is inserted once and made available for all test methods in the test class. 22 of 60. A Next Best Action strategy uses an Enhance element that invokes an Apex method 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*/ }. 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. Lightning Data Service handles sharing rules and field-level security. B. The with sharing keyword must be used to enforce sharing rules. C. The isAccessible ( ) method must be used for field-level access checks. D. Lightning Data Service ignores field-level security. 20 of 60. A developer creates a batch Apex job to update a large number of record and receives reports of the job timing out and not completing. What is the first step towards troubleshooting the issue?. Check the asynchronous job monitoring page to view the job status and logs. Check the debug logs for the batch job. Decrease the batch size to reduce the load on the system. Disable the batch job and recreate it with a smaller number of records. What are two benefits of using External IDs? Choose 2 answers. An External ID is indexed and can improve the performance of SOQL queries. An External ID field can be used to reference a unique ID from another, external system. An External ID can be a formula field to help create a unique key from two fields in Salesforce. An External ID can be used with Salesforce Mobile to make external data visible. 18 of 60. 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?. Apex classes must have at least 75% code coverage org-wide. At least one line of code must be executed for the Apex trigger. All methods in the test classes must use @isTest. Test methods must be declared with the testMethod keyword. 17 of 60. For which three items can a trace flag be configured?. Visualforce. Apex Trigger. User. Process Builder. Apex Class. 16 of 60. What can be used to override the Account's standard Edit button for Lightning Experience?. Lightning action. Lightning flow. Lightning page. Lightning component. A developer needs to make a custom Lightning Web Component available in the Salesforce Classic user interface. Which approach can be used to accomplish this?. Wrap the Lightning Web Component In an Aura Component and surface the Aura Component as a Visualforce tab. Embed the Lightning Web Component is a Visualforce Component and add directly to the page layout. Use the Lightning Out JavaScript library to embed the Lightning Web Component in a Visualforce page and add to the page layout. Use a Visualforce page with a custom controller to invoke the Lightning Web Component using a call to an Apex method. 14 of 60. A developer wants to improve runtime performance of Apex calls by caching results on the client. What is the most efficient way to implement this and follow best practices?. A. Decorate the server-side method with @AuraEnabled(cacheable=true). B. Set a cookie in the browser for use upon return to the page. C. Call the setStorable() method on the action in the JavaScript client-side code. D. Decorate the server-side method with @AuraEnabled(storable=true). A lead developer creates a virtual class called "OrderRequest". Consider the following code snippet: Public class CustomerOrder { //code implementation } How can a developer use the OrderRequest class within the CustomerOrder class?. public class CusctomerOrder implements Order. @Implements (class="OrderRequest”) public class CusatomaxOrder. Extends (class="OrderRequest”) public class CuastomerOrder. public class CustomerOrder extends OrderRequest. Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won stage. How should a developer accomplish this?. Use an after-save flow. Use a validation rule. Use the Process Automation Settings. Use a trigger. The Account object in an organization has a master-detail relationship to a child object called Branch The following automations exist: Roll-up summary fields Custom validation rules Duplicate rules A developer created a trigger on the Account object. Which two things should the developer consider while testing the trigger code?. The validation rules will cause the trigger to fire again. Rollup summary fields can cause the parent record to go through Save. the trigger may fire multiple times during a transaction. Duplicate rules are executed once all DML operations commit to the database. 10 of 60. Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross the Shadow DOM boundary?. A. bubbles: true, composed: false. B. bubbles: true, composed: true. C. bubbles: false, composed: false. D. bubbles: false, composed: true. An org has an existing flow that edits an Opportunity with an Update Records element. A developer must update the flow to also create a Contact and store the created Contact's ID on the Opportunity. Which update must the developer make in the flow?. Add a new Update Records element. Add a new Create Records element. Add a new Get Records element. Add a new Roll Back Records element. A developer wants to import 500 Opportunity records into a sandbox. Why should the developer choose to use Data Loader instead of Data Import Wizard. Data Import Wizard does not support Opportunities. Data Loader automatically relates Opportunities to Accounts. Data Loader runs from the developer's browser. Data Import Wizard can not import all 500 records. 7 of 60. Which three resources in an Aura component can contain JavaScript functions? Choose 3 answers. Style. Helper. Renderer. Design. Controller. 6 of 60. Which three data types can a SOQL query return?. AsObject. Double. Long. List. Integer. A team of developers is working on a source-driven project that allows them to work independently, with many different org configurations. Which type of Salesforce orgs should they use for their development?. Developer orgs. Developer sandboxes. Full Copy sandboxes. Scratch orgs. 4 of 60. Which two are best practices when it comes to Aura component and application event handling? choose 2. Reuse the event logic in a component bundle, by putting the logic in the helper. Use component events to communicate actions that should be handled at the application level. Handle low-level events in the event handler and re-fire them as higher-level events. Try to use application events as opposed to component events. Universal Containers has implemented an order management application. Each Order can have one or more Order Line items. The Order Line object is related to the Order via a master-detail relationship. For each Order Line item, the total pri is calculated by multiplying the Order Line item price with the quantity ordered. What is the best practice to get the sum of all Order Line item totals on the Order record?. Declarative Roll-Up Summaries App. Roll-Up Summary field. Process Builder. Apex Trigger. 2 of 60. What are three considerations when using the eInvocableMeshed annotation in Apex? Choose 3. Only one method using the Invocablettethod annotation can be defined per Apex class. A method using the invocableMethod annotation must be declared as static. A method using the Invonahlashed annotation can be declared as Public or Global. A method using the Invocablettethod annotation can have multiple input parameters. A method using the InvocableMethod annotation must define a return value. What should be used to create scratch orgs?. Workbench. Salesforce CLI. Developer Console. Sandbox refresh. 59 of 60. Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a master-detail relationship with the standard Account object. Based on some internal discussions, the UC administrator tried to change the master detail relationship to a lookup relationship, but was not able to do so. What is a possible reason that this change was not permitted?. The Vendor records have existing values in the Account object. The Account object is included on a workflow on the Vendor object. The Account records contain Vendor roll-up summary fields. The Vendor object must use a Master-Detail field for reporting. |