asdfghjklñ3
|
|
Título del Test:
![]() asdfghjklñ3 Descripción: asdfghjklñ 3 |



| Comentarios |
|---|
NO HAY REGISTROS |
|
A developer is tasked with building a custom Lightning web component to collect Contact Information. The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users. What should the developer use in their Lightning Web Component to support the security requirements?. force-input-field. aura-input-field. ui-input-field. lightning-input-field. 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?. OrgLimits. Limits. Exception. Messaging. What are two benefits of using declarative customizations over code? Choose 2 options. Declarative customizations cannot generate run time errors. Declarative customizations automatically update with each Salesforce release. Declarative customizations automatically generate test classes. Declarative customizations generally require less maintenance. 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 failure due to the Task insert statement, so that manual restarts are not needed?. Use the Database method with allOrNone set to false. Remove the Apex class from the integration user ' s profile. Use a try-catch block after the insert statement. Deactivate the trigger before the integration runs. Where are two locations a developer can look to find information about the status of batch or future methods? Choose 2 options. Apex Jobs. Apex Flex Queue. Paused Interviews component. Developer Console. Which two operations affects the number of times a trigger can fire?. Roll-up summary fields. After-save record-triggered flow. Email messages. Criteria-based sharing calculations. 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 options. Validation Rules. Remote Actions. Batch Jobs. Record-Triggered Flow. If Apex code executes inside the execute () method of an Apex class when implementing the Batchable interface, which two statements are true regarding governor limits? Choose 2 options. The Apex governor limits will use the asynchronous limit levels. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction. The Apex governor limits are omitted while calling the constructor of the Apex class. The Apex governor limits are reset for each iteration of the execute () method. In the following example, which sharing context will myMethod execute when it is invoked? public class myClass { public void myMethod() { /* implementation */ } }. Sharing rules will be inherited from the calling context. Sharing rules will be enforced for the running user. Sharing rules will not be enforced for the running user. Sharing rules will be enforced by the instantiating class. A developer is working on a project to import data from an external system into Salesforce. The data contains sensitive information that should no be visible to all users in Salesforce. What should the developer do to ensure that the data is secure?. Use the Salesforce CLI to import the data and set up user permissions to restrict access to sensitive data. Use the Apex Data Loader to import the data and write Apex code to handle security and access control. Use a third-party tool to encrypt the sensitive data before importing it into Salesforce. Use the Data Import Wizard to import the data and set up field-level security to restrict access to sensitive fields. 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 records. Which relationship field should be implemented to support these requirements?. Master-detail field from Engineering_Support__c to Opportinity. Master-detail field from Opportunity to Enginnering_Support__c. Lookup field from Engineering_Support__c to Opportunity. Lookup field from Opportunity to Engineering_Support__c. Which three statements are accurate about debug logs? Choose 3 options. System debug logs are retained for 24 hours. Only the 20 most recent debug logs for a user are kept. Debug logs can be set for specific users, classes, and triggers. The maximum size of a debug log is 5 MB. Debug logs levels are cumulative, where FINE log level includes all events logged at the DEBUG, INFO,WARN, and ERROR levels. Which annotation exposes an Apex class as a RESTful web service?. @AuraEnabled(cacheable=true). @RestResource(urlMapping=’/myService/*’). @RemoteAction. @HttpInvocable. Which exception type cannot be caught?. NoAccessException. CalloutException. A custom exception. LimitException. A developer created this Apex trigger that calls MyClass.myStaticMmethod: trigger myTrigger on Contact (before insert) { My Class.myStaticMethod(trigger.new); } The developer creates a test class with a test method that calls MyClass.myStaticMethod directly, resulting in 81% overall code coverage. What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?. The deployment fails because no assertions were made in the test method. The deployment passes because the Apex code has the required >75% code coverage. The deployment passes because both classes and the trigger were included in the deployment. The deployment fails because the Apex trigger has no code coverage. 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 using the external ID field?. upsert orders;. merge orders Order_Number__c;. merge orders;. upsert orders Order_Number__c;. A developer needs to confirm that a Contact trigger works correctly without changing the organization’s data. What should the developer do to test the Contact trigger?. Use the New button on the Salesforce Contacts Tab to create a new Contact record. Use the Open Execute Anonymous feature on the Developer Console to run an ‘insert Contact’ DML statement. Use Deploy from the VSCode IDE to deploy an ‘insert Contact’ Apex class. Use the Test menu on the Developer Console to run all test classes for the Contact trigger. Which three resources in an Aura component can contain JavaScript functions? Choose 3 options. Helper. Style. Design. Controller. Renderer. A developer needs to allow users to complete a form on an Account record that will create a record for a custom object. The form needs to display different fields depending on the user’s job role. The functionality should only be available to a small group of users. Which three things should the developer do to satisfy these requirements? Choose 3 options. Create a Lightning web component. Create a Dynamic Form. Create a Custom Permission for the users. Add a Dynamic Action to the User’s assigned Page Layouts. Add a Dynamic Action to the Account Record Page. What are three ways for a developer to execute test in an org?. Bulk API. Tooling API. Salesforce DX. Metadata API. Setup Menu. Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts. The component should be able to validate the user input before saving the information to the database. What is the best technology to create this component?. Lightning Web Components. Flow. Visualforce. VUE JavaScript framework. 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?. An Apex REST class. An invocable method. An outbound message. An Apex controller. Which three Salesforce resources can be accessed from a Lightning web component? Choose 3 options. All external libraries. Third-party web components. Static resources. SVG resources. Content asset files. Universal containers wants Opportunities to no longer be editable when it reaches the Closed/Won stage. Which two strategies can a developer use to accomplish this? Choose 2 options. Use an auto-response rule. Use an automatically launched Approval Process. Use a before-save Apex trigger. Use a validation rule. A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message ‘Maximum trigger depth exceeded’. What could be the possible causes?. The trigger is getting executed multiple times. The trigger does not have sufficient code coverage. The developer does not have the correct user permission. The trigger is too long and should be refactored into a helper class. 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 type of Salesforce Cases. Which approach can efficiently generate the required data for each unit test?. Add @IsTest(seeAllData=true) at the start of the unit test class. Create test data before Test.startTest() in the unit test. Create a mock using the Stub API. Use @TestSetup with a void method. Which action causes a before trigger to fire by default for Accounts?. Converting Leads to Contacts. Updating addresses using the Mass Address update tool. Importing data using the Data Loader and the Bulk API. Renaming or replacing picklists. A developer wants to send an outbound message when a record meets a specific criteria. Which two features satisfy this use case? Choose 2 options. Approval Process can be used to check the record criteria and send an outbound message without Apex code. Next Best Action can be used to check the record criteria and send an outbound message. Entitlement Process can be used to check the record criteria and send an outbound message without Apex code. Flow Builder can be used to check the record criteria and send an outbound message. A developer has an integer variable called maxAttempts. The developer need to ensure that once maxAttempts is initialized, it preservers its value for the length of the Apex transaction; while being able to share the variable’s state between trigger executions. How should the developer declare maxAttempts to meet these requirements?. Declare maxAttempts as a constant using the static and final keywords. Declare maxAttempts as a variable on a helper class. Declare maxAttempts as a private static variable on a helper class. Declare maxAttempts as a member variable on the trigger definition. What are two use cases for executing Anonymous Apex code? Choose 2 options. To run a batch Apex class to update all Contacts. To schedule an Apex classes to run periodically. To delete 15,000 inactive Accounts in a single transaction after a deployment. To add unit test code coverage to an org. 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 options. SOSL is able to return more records. SOQL is able to return more records. SOSL is faster for text searches. SOQL is faster for text searches. A developer created these three Rollup Summary fields in 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. Which should the developer use to implement the business requirement in order to minimize maintenance overhead?. Record-triggered flow. Formula field. Apex trigger. Roll-up summary field. What should be used to create scratch orgs?. Salesforce CLI. Workbench. Sandbox refresh. Developer Console. Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order records will be imported into Salesforce. How should the Order Number field be defined in Salesforce?. Lookup. Indirect Lookup. External ID and Unique. Direct Lookup. Which two settings must be defined in order to update a record of a junction object? Choose 2 options. Read access on the primary relationship. Read/Write access on the primary relation. Read/write access on the secondary relationship. Read/Write access on the junction object. A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. The developer team decided that trigger should be tested with 200 account records with unique names. What two things should be done to create the test data within the unit test least amount of code? Choose 2 options. Create a static resource containing test data. Use Test.loadData to populate data in your test methods. Use the @isTest(isParallel=true) annotation in the test class. Use the @isTest(seeAllData=true) annotation in the test class. A developer is implementing an Apex class for a financial system. Within the class, the variables ‘creditAmount’ and ‘debitAmount’ should not be able to change once a value is assigned. In which two ways can be developer declare the variables to ensure their value can only be assigned one time? Choose 2 options. Use the static keyword and assign its value in a static initializer. Use the final keyword and assign its value when declaring the variable. Use the final keyword and assign its value in the class constructor. Use the static keyword and assign its value in the class constructor. While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors. Why did the method fail in the sandbox test framework but succeed in the Developer Console?. The test method is calling an @future method. The test method has syntax error in the code. The test method relies on exiting data in the sandbox. The test method does not use System.runAs to execute as a specific user. How is a controller and extension specified for a custom object named “Notice” on a Visualforce page?. apex:page standardController=”Notice__c” extensions=”myControllerExtension”. apex:page controller=”Notice__c” extensión=”myControllerExtension”. apex:page=Notice extends=”myControllerExtension”. apex:page controller=”Notice__c, myControllerExtension”. Which code statement includes an Apex method named updateAccounts in the class AccountController for use in a Lightning web component?. Import updateAccounts from ‘@salesforce/apex/AccountConttoller.updateAccounts’;. Import uddateAccounts from ‘AccountController.updateAccounts’;. Import updateAccounts from ‘@salesforce/apex/AccountController’;. Import updateAccounts from ‘AccountController’;. 41. 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 record via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to update a list of 179 accounts using Data Loader, its fails with System.Exception errors. Which two actions should the developer take to fix the code segment shown above? Choose 2 options. Use Database.query to query the opportunities. Move the DML that saves opportunities outside the for loop. Check if all the required fields for Opportunity are being added on creation. Query for existing opportunities outside the for loop. Which code displays the contents of a Visualforce page as a PDF?. <apex:page contentType=”pdf”>. <apex:page renderAs=”application/pdf”>. <apex:page contentType=”application/pdf”>. <apex:page renderAs=”pdf”>. A developer must create a CreditCardPayment class that provides an implementation of an existing Payment class. public virtual class Payment { public virtual void makePayment (Decimal amount) ( /*implementation*/) } Which is the correct implementation?. public class CreditCardPayment implements Payment { public virtual void makePayment (Decimal amount) ( /*implementation*/) }. public class CreditCardPayment implements Payment { public override void makePayment (Decimal amount) ( /*implementation*/) }. public class CreditCardPayment extends Payment { public virtual void makePayment (Decimal amount) ( /*implementation*/) }. public class CreditCardPayment extends Payment { public override void makePayment (Decimal amount) ( /*implementation*/) }. Refer to the following Apex code: Integer x = 0; do { x = 1; x++; } while (x < 1); System.debug(x) What is the value of x when it is written to the debug log?. 1. 3. 0. 2. Universal Containers recently transitioned from Classic to Lightning Experience. One of its business processes requires certain values from the Opportunity object to be sent via an HTTP REST callout to its external order management system when the user presses a custom button on the Opportunity detail page. Example values are as follows: • Name • Amount • Account Which two methods should the developer implement to fulfill the business requirement? Choose 2 options. Create a custom Visualforce quick action that performs the HTTP REST callout and use a Visualforce quick action to expose the component on the Opportunity detail page. Create 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 Lightning component quick action that performs the HTTP REST callout and use a Lightning 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 @Future(Callout=true) to perform the HTTP REST callout. 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. 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. Use the Metadata API to create real-time roll-up summaries. A developer is creating an app that contains multiple Lightning web components. One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigates to the next page. How should this be accomplished?. Fire a notification. Update a property on the parent. Create a custom event. Call a method in the Apex controller. A custom picklist field, Food_Preference__c, exists on a custom object. The picklist contains the following options: ‘Vegan’, ‘Kosher’, ‘No Preference’. The developer must ensure a value is populated every time a record is created or updated. What is the optimal way to ensure a value is selected every time a record is saved?. Mark the field as Required on the field definition. Write an Apex trigger to ensure a value is selected. Mark the field as Required on the object’s page layout. Set “Use the first value in the list as the default value” to True. A team of many developers work in their own individual orgs that have the same configuration as the production org. Which type of org is best suited for this scenario?. Partner Developer Edition. Developer Edition. Full Sandbox. Developer Sandbox. A developer created a child Lightning web component nested inside a parent Lightning web component. The parent needs to pass a string value to the child component. In which two ways can this be accomplished? Choose 2 options. The parent component can use the Apex controller calls to send data to the child component. The parent component can use a custom event to pass the data to the child component. The parent component can invoke a public method in the child component. The parent component can use a public property to pass the data to the child component. What are three capabilities of the <ltng:require> tag when loading JavaScript resources in Aura components? Choose 3 options. Loading files from Documents. Loading scripts in parallel. One-time loading for duplicates scripts. Specifying loading order. Loading externally hosted scripts. Flow Builder uses an Apex action to provide additional information about multiple contacts stored in a custom class, ContactInfo. Which is the correct definition of the Apex method that gets additional information?. @InvocableMethod(label=’Additional Info’) public List<ContactInfo> getInfo(List<Id> contactIds) { /*implementation*/ }. @InvocableMethod(label=’Additional Info’) public ContactInfo getInfo(Id contactIds) { /*implementation*/ }. @InvocableMethod(label=’Additional Info’) public static ContactInfo getInfo(Id contactIds) { /*implementation*/ }. @InvocableMethod(label=’Additional Info’) Public static List<ContactInfo> getInfo(List<Id> contactIds) { /*implementation*/ }. 53. A Developer Edition org has five existing accounts. A developer wants to add 10 more accounts for testing purposes. The following code is executed in the Developer Console using the Execute Anonymous window: Account myAccount = new Account(Name = ‘MyAccount’); insert myAccount; Integer x=1; List<Account< newAccounts = new List<Account>(); do { Account acct = new Account (Name = ‘New Account ‘ + X++); newAccounts.add(acct); } while (x < 10); How many total accounts will be in the org after this code is executed?. 5. 15. 6. 10. A developer is creating a Lightning web component to show a list of sales records. The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all fields on the record except the commission field. How should this be enforced so that the component works for both users without showing any errors?. User Lightning Locker Service to enforce sharing rules and field-level security. Use WITH SECURITY_ENFORCED in the SOQL that fetches the data for the component. Use Security.stripInaccessible to remove fields inaccessible to the current user. Use Lightning Data Service to get the collection of sales records. Which statement generates a list of Leads and Contacts that have a field with the phase ‘ACME’?. List<List <sObject>> searchList = [FIND ‘*ACME*’ IN ALL FIELDS RETURNING Contact, Lead];. Map <sObject> searchList = [FIND ‘*ACME*’ IN ALL FIELDS RETURNING Contact, Lead];. List <sObject> searchList = [FIND ‘*ACME*’ IN ALL FIELDS RETURNING Contact, Lead];. List<List <sObject>> searchList = [SELECT Name, ID FROM Contact, Lead WHERE Name like ‘%ACME%’];. Which scenario is valid for execution by unit test?. Generate a Visualforce PDF with getContecntAsPDF(). Set the created date of a record using a system method. Execute anonymous Apex as a different user. Load data from a remote site with a callout. 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?. External ID field. Formula field. External Object. Lookup field. When a user edits the Postal Code on an Account, a custom Account test field named “Timezone” must be updated based on the values in a PostalCodeToTimezone__c custom object. Which two automation tools can be used to implement this feature? Choose 2 options. Approval process. Quick Actions. Fast Field Updates record-triggered flow. Account trigger. An org has an existing flow that edits an Opportunity with an Update Records elements. 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 Roll Back Record element. Add a new Create Records element. Add a new Get Records element. Which two events need to happen when deploying to a production org? Choose 2 options. All triggers must have some test coverage. All Visual flows must have at least 1% test coverage. All Apex code must have at least 75% test coverage. All Apex code must have at least 75% test coverage. |




