Test III - c01bd10e-1c93-4e72-bb94-8de106c8b776
![]() |
![]() |
![]() |
Título del Test:![]() Test III - c01bd10e-1c93-4e72-bb94-8de106c8b776 Descripción: Developer 1 |




Comentarios |
---|
NO HAY REGISTROS |
Which three stom Scalable Vector Graphics (SVG) to be included in a Lightning web component? Choose 3 answers. Import the SVG as a content asset file. Reference the property in the HTML template. Upload the SVG as a static resource. Import the static resource and provide a JavaScript property for it. Reference the import in the HTML template. How does the Lightning Component framework help developers implement solutions faster?. By providing an Agile process with default steps. By providing change history and version control. By providing code reviews standards and processes. By providin device-awareness for mobile and desktops. Which two scenarios require an Apex method to be called imperatively from a Lightning web component? Choose 2 answers. Calling a method that makes a web service callout. Calling a method that is not annotated with cacheable=true. CAlling a method with the click of a button. Calling a method that is external to the main controller for the Lightning web component. 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. Which relationship field should be implemented to support these requirements?. Master-detail field from Engineering_Support__c to Opportunity. Lookup field from Opportunity to Engineering_Support__c. Master-detail field from Opportunity to Engineering_Support__c. Lookup field from Engineering_Support__c to Opportunity. Universal Containers recently transitioned from Classic to Lightning Experience, One of its business processes requires certamn values from the Opportunity object to be sent via an HTTP REST callout to its external order management system based on an ad-hoc basis when the user presses a custom button on the Opportunity detal page. Example values are as follows: * Name * Amount * Account Which two methods should the developer implement to fulfill the business requirement? Choose 2 answers. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page. Creste a Remote Action on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity is updated. Create a Visualforce page that performs the HTTP REST callout, and use a Visuallorce quick action to expose the component on the Opportunity detail page. Create an after update trigger on the Opportunity object that calls a helper method using Afurare (Callcarzesue) to perform the HTTP REST callout. 17. A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises 95% coverage of the new Apex helper class. Change Set deployment to production fails with the test coverage warning: "Test coverage ol selected Apex Trigger is 0%, at lenst 1% test coverage is required." What should the developer do to successfully deploy the new Apex trigger and helper class?. Increase the test class coverage on the helper class. Remove the falling test methods from the test class. Run the tests using the 'Run All Tests' method. Create a test class and methods to cover the Apex trigger. 15. A developer crested these three Rollup Summary fields in the custom object, Project__e: Total_Timesheets__c Total_Approved_Timesheets__0 Total_Rejected_Timesheet__0 The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project, Which should the developer use to implement the business requirement in order to minimize maintenance overhead?. Roll-up summary held. Record-triggered flow. Apex trigger. Formula field. 14. 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 Opportunity object and use an aggregate function to sum the amount for all related child objects under the Opportunity. Use the Metadata API to create real-time roll-up summaries,. 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-ume roll-up summaries. 13. Which Apex class conteins methods to return the amount of resources that have been used for a particular governor, such as the number of OML statements?. Messaging. Exception. Limits. Orglimits. 12. A developer created this Apex trigger that calls MyClass.myStaticMethod; trigger myTrigger on Contact (before insert) { MyClass.myStaticMethod(trigger.new); } The developer creates a test class with a test method that calls MyClass.myStaticMethod directly, resulting 81% overall code coverage, What happens when the developer tries to deploy the trigger and two classes to production, assumning no other code exists?. The deployment passes because the Apex code has the required >75% code coverage. The deployment fails because no assertions were made im the test method. The deployment fails because the Apex trigger has no code coverage. The deployment passes because both dasses and the trigger were included in the deployment. 11. Which two settings must be defined in order to update a record of a junction object? Choose 2 answers. Read/Wrte access on the primary relationship. Read access on the primary relationship. Read/Write access on the secondary relationship. Read/Write access on the junction object. 10. Universal Containers (UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called "Global Address”. Which field should the developer add to create the most efficient model that supports the business need?. Add a lookup held on the Global Address object to the Account object. Add a lookup field on the Account object to the Global Address object. Add a master-detail field on the Account object to the Global Address object. Add a master-detail field on the Global Address object to the Account object. 9. Interms af the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce? Choose 2 answers. Rich component ecosystem. Log capturing via the Debug Logs Setup page. Self-contained and reusable units of an application. Built-in standard and custom set controllers. 8. The sales management team st Universal Containers requires that the Lead Source held of the Lead record be populated when a Lead is converted. What should be done to ensure that a user populates the Lead Source field prior to converting a Lead?. Use a validation rule. Use Lead Conversion field mapping. Create an after trigger on Lend. Use a formula field. 7. Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify, Since its release, users of the tool report they can see Accounts they do not own. What should the developer use to enforce sharing permissions for the currently logged in user while using the custom search tool?. Use the without sharing keyword on the class decoration. Use the schema describe calls to determine if the logged-in user has access to the Account object. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user. Use the with sharing keyword on the class declaration. 6.An org tracks customer orders using the Order and Line Item objects. The Line Item object has a master-detad relationship to the Order object. A developer has a requirement to calculate the total order amount for an Order and the line amount on each Line Item based on quantity and price. What is the correct implementation?. Write a single before trigger on the Line Ttem that calculates the item amount and updates the order amount on the Order,. Implement the line amount as a numeric formula field and the order amount as a roll-up summary field. Create a fast field update, record-triggered flow on the Line Item that calculates the tem amount and order amount and updates the fields on the Line Itern and the Order. Implement the line item amount as a currency field and the order amount as a SUM formula field. 5. 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 efficientiy generate the required data for each unit test?. Create a mock using the Stub API. Use @TestSetup with a void method. Create test data before Test.startTest() in the unit test. Add @IsTest(seeAllData=true) at the start of the unit test class. 4. Universal Containers is building a recruiting app with an Apphcant object that stores information about an individual person and a Job object that represents a job. Each apphicant may apply for more than one job. What should a developer implement to represent that an applicant has applied for a job?. Formula field on Applicant that references Job. Master-detail field from Applicant to Job. Junction object between Applicant and Job. Lookup field from Applicant to Job. 3. When a user edits the Postal Code on an Account, a custom Account text held named “Timezone” must be updated based on the values in a PostalCodeToTimezone__c custom object, Which two autormation tools can be used to implement this feature? Choose 2 answers. Approval process. Account trigger. Fast Field Updates record-triggered flow. Quick actions. 1. A developer must provide custom user interfaces when users edit a Contact in either Salestorce Classic or Lightning Experience. What should the developer use to override the Contact's Edit button and provide this functionality?. A Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience. A Lightning page in Salesforce Classic and a Visualforce page in Lightning Experience. A Visualforce page in Salesforce Classic and a Lightning component in Lightning Expenence. A Lightning component in Salestorce Classic and a Lightning component in Lightning Experience. 2. Universal Containers decides to use purely declarative development to build out a new Salesforce application. Which two options can be used to build out the business logic layer for this application? Choose 2 answers. Record-Triggered Flow. Remote Actions. Validation Rules. Batch Jobs. 60. Refer to the following Apex code: Integer x = 0; do { x = 1; x++; } while(x<1); System.debug(x); What ds the value of x when it is written to the debug log?. 0. 1. 2. 3. 59. For which three items can a trace flag be configured? Choose 3 answers. User. Flow. Visualforce. Apex Class. Apex Trigger. 58. Assuming that name is a String obtained by an <apex: inputText> tag on a Visualforce page, which two SOQL queries performed are safe from SOQL injection? Choose 2 answers. String query = 'SELECT Id FROM Account WHERE Name LIKE \'%' + String.scapeSingleQuotes(name) + '%\' '; List<Account> results = Database.query(query);. String query = '%' + name + '%'; List<Account> results = [SELECT Id FROM Account WHERE Name LIKE :query];. String query = 'SELECT Id FROM Account WHERE Name Like \'%' + name + '%\' '; List<Account> results = Database.query(query);. String query = 'SELECT Id FROM Account WHERE Name Like \'%' + name.noQuotes() + '%\' '; List<Account> results = Database.query(query);. 57. Which two operations affect the mumber of times a trigger can fire. Choose 2 answers. Email messages. Roll-up summary fields. Lohtning flows. Critena-based sharmg calculations. 56. The values 'High', 'Medim', and 'Low' are identified as common values for multiple picklists across different objects. What is an approach a developer can take to streamline maintenance of the picklists and them values, while also restricting the values to the ones mentioned above?. Create the Picklist on each object and select “Restrict picklist to the values defined in the value set”. Create the Picklist on esch object and use a Global Picklist Value Set containing the values,. Create the Picklist on each object as a required field and select “Display values alphabetically, not in the order entered”. Create the Picklist on each object and add a validation rule to ensure data Integrity. 55. A developer is debugging the following code to determine why Accounts are not being crested. List<Accounts> accts = getAccounts(); // getAccounts implemented elsewhere Database.insert(accts, false); How should the code be altered to help debug the issue?. Add a try-catch around the insex: method. Collect the insert method return value in a SaveResult variable. Set the second insert method parameter to true. Change the DML statement to insert accts. 54. A developer created a Lightning web component called statusComponent to be inserted into the Account record page. Which two things should the developer do to make this component available? Choose 2 answers. Add <target> Lightning__RecordPage </target> to the statusComponent.js file. Add <target>Lightning__RecordPage</target> to the statusComponent.js.met.xml file. Add <masterLabel>Account</masterLabel> to the statusComponent.js.met.xml file. Set isExposed to true in the statusComponent.js.meta.xml file. 53. How should a developer write unit tests for a private method in an Apex class?. Mark the Apex class as global. Add a test method in the Apex class. Use the TestVisible annotation. Use the SeeAliData annotation. 52. Referto the code snippet below: import fetchOpps from '@salesforce/apex/OpportunitySearch.fetchOpportunities'; @wire(fetchOpps) opportunities; When a Lightning web component is rendered, a list of opportunities that match certain criteria should be retrieved from the database and displayed to the end-user. Which three considerations must the developer implement to make the fetchOpportunities method available within the Lightning web component? Choose 3 answers. The method cannot mutate the result set retrieved from the database. The method must be annotated with the @InvocableMethod annotaton. The method must specify the (continuation=true) attribute. The method must be annotated with the @Auraenabled anmotation. The method must specify the (cacheable=true) atribute. 51. Universal Containers hires a developer to build a custom search page to help users find the Accounts they want. Users will be able to search on Name, Description, and a custom comments field. Which consideration should the developer be aware of when deciding between SOQL and SOSL? Choose 2 answers. SOQL is able to return more records. SOQL is faster for text searches. SOSL is faster for text searches. SOSL is able to return more records. 50. A developer has identified a method in an Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account, The method also performs a DML statement to save the changes to the database, Which two techniques should the developer implement as a best practice to ensure transaction control and avod exceeding governor limits? Choose 2 answers. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL. Use partial DML statements to ensure only valid data is committed. Use the Database.Savepoint method to enforce database integrity. Use the System.Limit class to monitor the current CPU governor limit consumption. 48. A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an Orderltem 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 Orderltem records to a new Order record?. Select the Allow reparenting option on the master-detail relationship. Add without sharing to the Apex class declaration,. Change the master-detail relationship to an external lookup relationship. Create a junction object between OrderItem and Order. 47. 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. 46. A developer wants to import 500 Opportunity records into a sandbox. Wehy should the developer choose to use Data Loader instead of Data Import Wizard?. Data Import Wizard does not support Opportunities. Data Import Wizard can not import all 500 records. Data Loader runs from the developer's browser. Data Loader automatically relates Opportunities to Accounts. 45. What are two ways a developer can get the status of an enqueued job for a class that implements the queueable interface? Choose 2 answers. View the Apex Flex Queue. View the Apex Status page. Query the AsyncApexJob object. View the Apex Jobs page. 44. A development tesm 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 2 answers. Developer Console. Ant Migration Tool. SFDX CLI. Change Sets. 43. A developer considers the following snippet of code: Boslena isOLK; 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;. 2. 1. 3. 4. 42. A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL. Which three statements are useful inside the unit test to effectively test the custom controller? Choose 3 answers. String nextPage = controller.save().getUrl();. ApexPages.currentPage().getParameters().put("input", 'TestValue');. Test.setCurrentPAge(pageRef);. insert pageRef;. public ExtendsController{ApexPages.StandardController cntrl}(). 41. Which three statements are true regarding custom exceptions in Apex? Choose 3 answers. A custom exception class can extend other classes besides the Excaprion class. A custom exception class can implement one or many interfaces. A custom exception class cannot contain member variables or methods. A custom exception class name must end with “Exception”. A custom exception class must extend the system Exception class. 40. What can be used to override the Account's standard Edit button for Lightning Experience?. Lightning action. Lightning flow. Lightning page. Lightning component. 39. A developer must implement a hechpaymenticoceraos class that provides check processing payment capabilmes that adhere to what is defined for payments in the paymentrrocesosz interface. public interface PaymentProcessor { void pay(Decimal amount); } Which implementation is correct to use the Paynentrrocessor interface class?. public class CheckPaymentProcessor extends 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){ // functional code here } }. public class CheckPaymentProcessor implements PaymentProcessor{ public void pay(Decimal amount){ // functional code here } }. 38. Since Aura application events follow the traditional publish-subscribe model, which method is used to fire an event?. fire(). registerEvent(). emit(). fireEvent(). 37. Which three resources in an Aura component can contain JavaScript functions? Choose 3 answers. Controller. Style. Helper. Design. Renderer. 36. While writing an Apex class, a developer wants to make sure that all functionality being developed is handied as specified by the requirements. Which approach should the developer use to be sure that the Apex class ís working according to specifications?. Run the code in an Execute Anonymous block in the Developer Console. Include a savepoint and Database.rollback(). Indude a try/catch block to the Apex class. Create a test dass to execute the business logic and run the test in the Developer Console. 35. Given the following Anonymous block: List<Case> caseToUpdate = new List<Case>(); for(Case thisCase : [SELECT Id, Status FROM Case LIMIT 30000]){ thisCase.Status = 'Working'; casesToUpdate.add(thisCase); } try{ Database.update(casesToUpdate, false); }catch (Exception e){ System.debug(e.getMessage()); } What should a developer consider for an environment that has over 10,000 Case records?. The try-catch block will handle exceptions thrown by governor limits. The try-catch block will handle any DML exceptions thrown. The transaction will succeed and changes will be committed. -. 34. A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user. How can the developer make sure that validation rule violations are displayed?. Perform the DML using the Database.upsert() method. Incude <apex:message> on the Visualforce page. Add custom controller attributes to display the message. Use a try/catch with a custom exception class. 33. Universal Containers (UC) is developing a process for their sales teams that requires all sales reps to go through a set of scripted steps with each new customer they create. n the first step of collecting information, UC's ERP system must be checked via a REST endpoint to ses f the customer exists. If the customer exists, the data must be presented to the sales rep in Salestorce, Which two should a developer implement to satisfy the requirements? Choose 2 answers. Triggers. Invocable method. Flow. Future method. 32. Which action causes a before trigger to fire by default for Accounts?. Updating addresses using the Mass Address update tool. Importing data using the Data Loader and the Bulk API. Converting Leads to Contacts. Converting Leads to Contacts. Renaming or replacing picklist. 31. 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 2 answers. Test methods must be declared with the testMethod keyword. 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 ín the test classes must use @isTest. 30. A developer is asked to create a Visualforce page that lists the contacts owned by the current user. This component will be embedded in a Lightning page. Without writing unnecessary code, which controller should be used for this purpose?. Standard controller. Custom controller. Standard list controller. Lightning controller. 29. What should be used to create scratch orgs?. Salesforce CLI. Developer Console. Workbech. Sandbox refresh. 28. Ursa Major Solar has a custom object, ServiceJob__c, with an optional Lookup field to Account called Partner_Service_Provider__c. The TotalJobs__c field on Account tracks the total number of ServiceJob__c records to which a partner service provider Account is related. What is the most efficient way to ensure that the TotalJobs__c field kept up to date?. Create a schedule-triggered flow on ServiceJob__c. Create an Apex trigger on ServiceJob__c. Change TotalJobs__c to a roll-up summary field. Create a record-triggered flow on ServiceJob__c. 27. Which statement describes the execution order when triggers are associated to the same object and event?. Triggers are executed in the order they are modified,. Triggers are executed in the order they are created. Triggers are executed alphabetically by trigger name. Triggers execution order cannot be guaranteed,. 26. 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?. The with sharing keyword must be used to enforce sharing rules. The isAccessible() method must be used for field-level access checks,. Lightning Data Service handies sharing rules and feld-level security. Lightning Data Service ignores field-level security. 25. Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class, BodyFat, and lts method, calculateBodyFat(). The product owner wants to ensure this method is accessible by the consumer of the application when developing customizations outside the ISV's package namespace. Which approach should a developer take to ensure calculateBodyFat() is accessible outside the package namespace?. Declare the class as global and use the public access modifier on the method. Declare the class and method using the public access modifer. Declare the class as public and use the global access modifier on the method. Declare the class and method using the global access modifer. 24. A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org. Which tool should the developer use to troubleshoot?. Setup Menu. Developer Console. Visual Studio Code IDE. AppExchange. 23. Which two are best practices when it comes to Aura component and application event handling? Choose 2 answers. Tryto use application events as opposed to component events,. Use component events to communicate actions that should be handied at the application level. Handle Jow-level events in the event handier and re-fire them as higher-level events,. Rouse the event logic in a component bundle, by putting the logic in the helper. 22. When a user eds 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. Butid a fow wth Flow Budder. Create an account approval process. Creste a formula field. |