option
Questions
ayuda
daypo
search.php

ERASED TEST, YOU MAY BE INTERESTED ON examen de certi

COMMENTS STATISTICS RECORDS
TAKE THE TEST
Title of test:
examen de certi

Description:
examen de certi 1

Author:
Tomas
Other tests from this author

Creation Date: 28/11/2024

Category: Others

Number of questions: 71
Share the Test:
New CommentNuevo Comentario
No comments about this test.
Content:
Application Events follow the traditional publish-subscribe model. Which method is used to fire an event? fire( ) registerEvent( ) emit( ) fireEvent( ).
A workflow updates the value of a custom field for an existing Account. How can a developer access the updated custom field value from a trigger? By writing a Before Insert trigger and accessing the field value from Trigger.new By writing an After Insert trigger and accessing the field value from Trigger.old By writing an After Update trigger and accessing the field value from Trigger.old By writing a Before Update trigger and accessing the field value from Trigger.new.
A developer wants to retrieve the Contacts and Users with the email address 'dev@uc.com'. Which SOSL statement should the developer use? FIND {dev@uc.com} IN Email Fields RETURNING Contact (Email), User (Email) FIND {Email = 'dev@uc.com'} IN Contact, User FIND Email IN Contact, User FOR {dev2uc.com} FIND {Email = 'dev@uc.com'} RETURNING Contact (Email), User (Email).
Given the following trigger Implementation: trigger leadTrigger on Lead (before update0{ final ID BUSINESS_RECORDTYPEID = '012500000009Qad'; for(Lead thisLead : Trigger.new}{ if(thisLead.Company !=null &&thisLead.RecordTypeId !=BUSINESS_RECORDTYPE){ thisLead.RecordTypeId = BUSINESS_RECORDTYPEID; } } } The developer receives deployment errors every time a deployment is attempted from Sandbox to Production. What should the developer do to ensure a successful deployment? Ensure the deployment is validated by a System Admin user on Production. Ensure BUSINESS_RECORDTYPEID is retrieved using Schema.Describe calls. Ensure BUSINESS_RECORDTYPEID is pushed as part of deployment components. Ensure a record type with an ID of BUSINESS_RECORDTYPEID exists on Production prior to deployment.
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 answers. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction. The Apex governor limits are relaxed while calling the constructor of the Apex class. The Apex governor limits are reset for each iteration of the execute ( ) method. The Apex governor limits might be higher due to the asynchronous nature of the transaction.
A developer creates a Lightning web component that imports a method within an Apex class. When a Validation button is pressed, that runs to execute complex validations. In this implementation scenario, which artifact is part of the Controller according to the MVC architecture? XML file HTML file Apex class JavaScript file.
Which process automation should be used to send an outbound message without using Apex code? Workflow Rule. Process Builder. Strategy Builder. Flow Builder.
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 \''$" + name.noQuotes() + '$\"'; List <Account> results = Database.query (query); String query = "SELECT Id FROM Account WHERE Name LIKE \''$" + String.escapeSingleQuotes (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);.
An Apex method, getAccounts, that returns a List of Accounts given a search Term, is available for Lightning Web components to use. What is the correct definition of a Lightning Web component property that uses the getAccounts method? @AuraEnabled(getAccounts, (searchTerm: ‘$searchTerm’)) accountList; @AuraEnabled(getAccounts, ‘$searchTerm’) accountList; @wire(getAccounts, { searchTerm: '$searchTerm' }) accountList; @wire(getAccounts, ‘$searchTerm’) accountList;.
A developer wants to import 500 Opportunity records into a sandbox. Because of what reason developer choose Data Loader over the Data Import Wizard? Data Loader automatically relates Opportunities to Accounts. Data Import Wizard does not support Opportunities. Data Loader runs from the developer's browser. Data Import Wizard can not import all 500 records.
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. 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. The data import wizard is a client application provided by Salesforce.
What are three considerations when using the @InvocableMethod annotation in Apex? Choose 3 answers. A method using the @invocableMethod annotation can have multiple input parameters. A method using the @invocableMethod annotation must be declared as static. Only one method using the @InvocableMethod annotation can be defined per Apex class. A method using the @InvocableMethod annotation can be declared as Public or Global. A method using the @invocableMethod annotation must define a return value.
Which two types of process automation can be used to calculate the shipping cost for an Order when the Order is placed and apply a percentage of the shipping cost to some of the related Order Products? Choose 2 answers. Workflow Rule Flow Builder Approval Process Process Builder.
Which three statements are accurate about debug logs? Choose 3 answers. Debug Log Levels are cumulative, where FINE Log level includes all events logged at the DEBUG, INFO, WARN, and ERROR levels. To View Debug Logs, “Manage Users” or “View All Data” permission is needed. To View Debug Logs, “Manage Users” or “Modify All Data” permission is needed. The amount of information logged in the debug log can be controlled by the log levels. The amount of information logged in the debug log can be controlled programmatically.
A recursive transaction is initiated by a DML statement creating records for these two objects: • Accounts. • Contacts. The Account trigger hits a stack depth of 16. Which statement is true regarding the outcome of the transaction? The transaction is partially committed up until the stack depth is exceeded. The transaction succeeds and all changes are committed to the database. The transaction fails and all the changes are rolled back. The transaction succeeds as long as the Contact trigger stack depth is less than or equal to 16.
How does the lightning component framework help developers implement solutions faster? By providing code review standards and processes. By providing device-awareness for mobile and desktops. By providing an agile process with default steps. By providing change history and version control.
A developer creates a custom exception as shown below: public class ParityException extends Exception ( ) What are two ways the developer can fire the exception in Apex? Choose 2 answers. throw new ParityException (‘parity does not match'); throw new ParityException( ); new ParityException (‘parity does not match’); new ParityException ( );.
Cloud Kicks (CK) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises CK 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 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. Add a Lookup field on the Global Address object to the Account object.
An org tracks customer orders on an Order object and the line Items of an Order on the Line Item object. The line Item object has a Master-Detail relationship to the order object. A developer has a requirement to calculate the order amount on an Order and the line amount on each Line Item based on quantity and price. What is the correct implementation? Write a process on the Line Item that calculates the item amount and order amount and updates the fields on the Line Item and the Order. Implement the line amount as a numeric formula field and the order amount as a roll-up summary field. Implement the line amount as a currency field and the order amount as a SUM formula field. Write a single before trigger on the Line Item that calculates the item amount and updates the order amount on the Order.
What should a developer do to check the code coverage of a class after running all tests? View the Overall Code Coverage panel of the Tests tab in the Developer Console. View the Class Test Coverage tab on the Apex Class record in Salesforce Setup. Select and run the class on the Apex Test Execution page. View the Code Coverage column in the list view on the Apex Classes page.
What should be used to create scratch orgs? Workbench Salesforce CLI Sandbox refresh Developer Console.
A developer wants to mark each Account in a List<Account> as either Active or Inactive based on the Last Modified Date field value being more than 90 days. Which Apex technique should the developer user? A Switch statement, with a for loop inside. A for loop, with an if/else statement inside. An if/else statement, with a for loop inside. A for loop, with a switch statement inside.
What is the maximum number of SOQL queries used by the following code? 5 1 2 6.
A custom picklist field, Food_Preference__c, exist 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 most efficient way to ensure a value is selected every time a record is saved? Mark the field as Required on the object's page layout. Set 'Use the first value in the list as the default value' as True. Mark the field as Required on the field definition. Set a validation rule to enforce a value is selected.
A developer has to identify 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 avoid exceeding governor limits? Choose 2 answers. Use Partial DML statements to ensure only valid data is committed. Use the Database.Savepoint method to enforce database integrity. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL. Use the System.Limit class to monitor the current CPU governor limit consumption.
What is the value of the Trigger.old context variable in a Before Insert trigger? An empty list of sObjects Null Undefined A list of newly created sObjects without IDs.
How should a developer write unit tests for a private method in an Apex class? Use the Test Visible annotation. Mark the Apex class as global. Use the See All Data annotation. Add a test method in the Apex class.
Consider the following code snippet: public static void insertAccounts (List<Account> theseAccounts) { for (Account thisAccount : theseAccounts) { if (thisAccount.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? Remove null items from the list of Accounts Implement the upsert DML statement. Implement a try/catch block for the DML. Implement Change Data Capture.
A developer needs to prevent the creation of Request__c records when certain conditions exist in the system. A RequestLogic Class exists that checks the conditions. What is the correct implementation? trigger RequestTrigger on Request__c (after insert) { if (RequestLogic.isValid(Request__c)) Request.addError(‘Your request cannot be created at this time.’); } trigger RequestTrigger on Request__c (after insert) { RequestLogic.validateRecords {trigger.new}; } trigger RequestTrigger on Request__c (before insert) { RequestLogic.validateRecords(trigger.new); } trigger RequestTrigger on Request__c (before insert) { if (RequestLogic.isValid (Request__c)) Request.addError(‘Your request cannot be created at this time.’); }.
A developer wants to invoke an outbound message when a record meets a specific criteria. Which two features satisfy this use case? Choose 2 answers. Process Builder 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. The Approval Process has the capability to check the record criteria and send an outbound message without an Apex code. Flow Builder can be used to check the record criteria and send an outbound message without additional code.
What should a developer use to fix a Lightning web component bug in a sandbox? Developer Console Force.com IDE Execute Anonymous VS Code.
An Approval Process is defined in the Expense_Item_c object. A business rule dictates that whenever a user changes the Status to 'Submitted' on an Expense_Report_c, all the Expense_Item_c records related to the expense report must enter the approval process individually. Which approach should be used to ensure the business requirement is met? Create two Process Builders, one on Expense_Report__c to mark the related Expense_Item__c as submittable and the second on Expense_Item__c to submit the record for approval. Create a Process Builder on Expense_Report__c to mark the related Expense_Report__c as submittable and a trigger on Expense_item__c to submit the record for approval. Create a Process Builder on Expense_Report__c with an ‘Apex’ action type to submit all related Expense_Item__c record when the criteria is met. Create a Process Builder on Expense_Report_c with a 'Submit for Approval' action type to submit all related Expense_Item_c records when the criteria is met.
When a user edits the Postal Code on an Account, a custom account text fi eld named "Timezone" must be updated based on the values in a Postal Code To TimeZone_c custom object. How can a developer implement this feature? Build a Workflow Rule. Build an Account Approval Process. Build a Flow with Flow Builder. Build an Account Assignment Rule.
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 Scratch orgs Developer sandboxes Full Copy sandboxes.
Which two statements are true about Getter and Setter methods as they relate to Visualforce? Choose 2 answers. Setter methods always have to be declared global. Getter methods can pass a value from a controller to a page. Setter methods are required to pass a value from a page to a controller. There is no guarantee for orders in which Getter or Setter methods are executed.
A developer is writing tests for a class and needs to insert records to validate functionality. Which annotation method should be used to create records for every method in the test class? @TestSetup @isTest (SeeAllData=true) @isTest (SeeAllData=true) @PreTest.
What is an example of a polymorphic lookup field in Salesforce? A custom field, Link__c, on the standard Contact object that looks up to an Account or a Campaign. The LeadId and ContactId fields on the standard Campaign Member object. The WhatId field on the standard Event object. The ParentId field on the standard Account object.
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. ChangeSet deployment to production fails with the test coverage warning: “Test coverage of selected Apex Trigger is 0%, at least 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. Create a test class and methods to cover the Apex trigger. Remove the failing test methods from the test class. Run the tests using the ‘Run All Tests’ method.
A development team wants to use a development 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 SFDX CLI VSCode Change Sets Developer Console.
What are two use cases for executing Anonymous Apex code? Choose 2 answers. To delete 15,000 inactive Accounts in a single transaction after a deployment. To schedule an Apex class to run periodically. To run a batch Apex class to update all Contacts. To add unit test code coverage to an org.
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 2 answers. The parent component can use a custom event to pass the data to the child component. The parent component can use the Apex controller class to send data to the child component. The parent component can use a public property to pass the data to the child component. The parent component can invoke a method in the child component.
Which three data types can a SOQL query return? Choose 3 answers. Double Long List sObject Integer.
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 a certain default value based on the record type before inserting the record. How can the developer find the current user’s default record type? Use the Schema.userInfo.Opportunity.getDefaultRecordType() method. Use Opportunity.SOjectType.getDescribe().getRecordTypeInfos() to get a list of record types, and iterate through them until isDefaultRecordTypeMapping() is True. Query the profile where the ID equals to userInfo.getProfileID() and then use the Profile.Opportunity.getDefaultRecordType() method. Create the opportunity and check the opportunity.recordType before inserting, which will have the record ID of the current user’s default.
Which two operations can be performed using a formula field? Choose 2 answers. Calculating a score on a lead based on the information from another field. Displaying an image based on the opportunity Amount. Displaying the last four digits of an encrypted Social Security number. Triggering a Process Builder.
What is the result of the following code? Account a = new Account(); Database.insert(a , false); The record will be created and no error will be reported. The record will be created and a message will be in the debug log. The record will not be created and no error will be reported. The record will not be created and an exception will be thrown.
A developer needs to join data received from an integration with an external system with parent records in Salesforce. The data set does not contain the Salesforce IDs of the parent records, but it does have a foreign key attribute that can be used to identify the parent. Which action will allow the developer to relate records in the data model without knowing the Salesforce ID? Create a custom field on the child object of type External Relationship. Create and populate a custom field on the parent object marked as an External ID. Create and populate a custom field on the parent object marked as Unique. Create a custom field on the child object of type Lookup.
What is the result of the following code snippet? Public void dowork(Account acct){ For (Integer i=0; i<=200; i++) { Insert acct; } } 201 Accounts are inserted. 0 Accounts are inserted. 200 Accounts are inserted. 1 Account is inserted.
Which statement describes the execution order when triggers are associated to the same object and event? Triggers are executed alphabetically by trigger name. Triggers are executed in the order they are created. Trigger execution order cannot be guaranteed. Triggers are executed in the order they are modified.
Ursa Major Solar (UMS) 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? Indirect Lookup Number with External ID Direct Lookup Lookup.
A developer has an integer variable called maxAttempts. The developer needs to ensure that once maxAttempts is initialized, it preserves 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 private static variable on a helper class. Declare maxAttempts as a constant using the static and final keywords. Declare maxAttempts as a member variable on the trigger definition. Declare maxAttempts as a variable on a helper class.
A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can override. What is the correct implementation of the ShippingCalculator class? public abstract class ShippingCalculator { public abstract calculate() {/* implementation */ } } public abstract class ShippingCalculator { public void calculate() {/* implementation */ } } public abstract class ShippingCalculator { public virtual void calculate() {/* implementation */ } } public abstract class ShippingCalculator { public override calculate() {/* implementation */ } }.
Ursa Major Solar (UMS) 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 with sharing keyword on the class declaration. Use the schema describe calls to determine if the logged-in user has access to the Account object. Use the without sharing keyword on the class declaration. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
What are the three characteristics of changeset deployments? Choose 3 answers. Changesets can deploy custom settings data. Changesets can be used to transfer records. Sending a changeset between two orgs requires a deployment connection. Deployment is done in a one-way, single transaction. Changesets can only be used between related organizations.
The following Apex method is part of the ContactService class that is called from a trigger: How should the developer modify the code to ensure best practices are met? public static void setBusinessUnitToEMEA ( List<contact> contacts) { for ( Contact thisContact : contacts) { thisContact.Business_Unit__c = 'EMEA' ; } update contacts ; } public static void setBusinessUnitToEMEA ( List<contact> contacts) { for ( Contact thisContact : contacts) { thisContact.Business_Unit__c = 'EMEA' ; update contacts [0] ; } } public static void setBusinessUnitToEMEA(Contact thisContact) { List<contact> contacts = new List<contact> () ; contacts.add ( thisContact.Business_Unit__c = 'EMEA') ; update contacts ; } public void setBusinessUnitToEMEA ( List<contact> contacts) { contacts [0].Business_Unit__c = 'EMEA' ; update contacts [0] ; }.
A developer created a Visualforce page and custom controller to display the account type field as shown below. Custom controller code: Public with sharing class customCtrlr{ Private Account theAccount; Public String actType; Public customCtrlr() { theAccount = [SELECT Id, Type FROM Account WHERE Id = :ApexPages.currentpage{}.getParameters{}.get('id')]; actType = theAccount.Type; } } Visualforce page snippet: The Account Type is {!actType} The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is properly referenced on the Visualforce page, What should the developer do to correct the problem? Add a getter method for the act Type attribute. Change theAccount attribute to public. Add with sharing to the custom controller. Convert the.Account.Type to a String.
A Visual Flow 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 the additional information? @InvocableMethod(label='Additional Info') public List<ContactInfo>getInfo(List<Id>contactIds) { /*implementation*/ } @InvocableMethod(label='additional Info') public static ContactInfogetInfo(Id contactId) { /*implementation*/ } @InvocableMethod(Label='additional Info') public ContactInfo(Id contactId) { /*implementation*/ } @invocableMethod(label='Additional Info') public static List<ContactInfo>getInfo(List<Id>contactIds) { /*Implementation*/ }.
Which scenario is valid for execution by unit tests? Generate a Visual force PDF with getContentAsPDF(). Set the created date of a record using a system method. Load data from a remote site with a callout. Execute anonymous Apex as a different user.
A developer has an Apex controller for a Visualforce page that takes an ID as a URL parameter. How should the developer prevent a cross-site scripting vulnerability? String.ValueOf(ApexPages.currentPage().getParametters().get(‘url_param’)) String.escapeSingleQuotes(ApexPages.currentPage().getParameters().get(‘url_param’)) ApexPages.currentPage().getParameters().get('url_param').escapeHtml() ApexPages.currentPage().getParameters().get(‘url_param’).
A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule also increments the count field every time that an Account is created or updated. The field update in the workflow rule is configured to not re-evaluate workflow rules. 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? 3 4 1 2.
A developer must create an Apex class, ContactController, that a Lightning component can use to search for Contact records. Users of the Lightning component should only be able to search for Contact records to which they have access. Which two will restrict the records correctly? Choose 2 answers. Public with sharing class ContactController. Public class ContactController. Public inherited sharing class ContactController. Public without sharing class ContactController.
Which two statements are accurate regarding Apex classes and interfaces? Choose 2 answers. Classes are final by default. Inner classes are public by default. Interface methods are public by default. A TOP-LEVEL Class can only have one inner class level.
The OrderHelper class is a utility class that contains business logic for processing orders. Consider the following code snippet: Public class without sharing OrderHelper { //code implementation } A developer needs to create a constant named DELIVERY_MULTIPLIER with a value of 4.15. The value of the constant should not modify any time in the code. How should the developer declare the DELIVERY_MULTIPLIER constant to meet the business objectives? static final decimal DELIVERY_MULTIPLIER = 4.15; static decimal DELIVERY_MULTIPLIER = 4.15; constant decimal DELIVERY_MULTIPLIER = 4.15; decimal DELIVERY_MULTIPLIER = 4.15;.
Which two statements accurately represent the MVC framework implementation in Salesforce? Choose 2 answers. Lightning component HTML files represent the Model (M) part of the MVC framework. Standard and Custom objects used in the app schema represent the View (V) part of the MVC framework. Validation rules enforce business rules and represent the Controller (C) part of the MVC framework. Records created or updated by triggers represent the Model (M) part of the MVC framework.
Cloud Kicks stores Orders and Line Items in Salesforce. For security reasons, financial representatives are allowed to see information on the Order such as order amount, but they are not allowed to see the Line items on the Order. Which type of relationship should be used? Indirect lookup. Direct Lookup. Lookup. Master-Detail.
Given the code below: List<Account> alist = [SELECT Id FROM Account]; for (Account a : aList){ List<Contact> cList = [SELECT Id FROM Contact WHERE AccountId = :a.Id); } Combine the two SELECT statements into a single SOQL statement. Add a LIMIT clause to the first SELECT SOQL statement. Rework the code and eliminate for a loop. Add a WHERE clause to the first SELECT SOQL statement.
A business implemented a gamification plan to encourage its customers to watch some educational videos. Customers can watch videos over several days, and their progress is recorded. Award points are granted to customers for all completed videos. When the video is marked as completed in Salesforce, an external web service must be called so that points can be awarded to the user. A developer implemented these requirements in the after update trigger by making a call to an external web service. However, a System.CalloutException is occurring. What should the developer do to fix this error? Replace the after update trigger with a before insert trigger. Move the callout to an asynchronous method with @future(callout=true) annotation. Surround the external call with a try-catch block to handle the exception. Write a REST service to integrate with the external web service.
Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers. Upload the SVG as a static resource. Import the SVG as a content asset file. Reference the import in the HTML template. Reference the getter in the HTML template. Import the static resource and provide a getter for it in JavaScript.
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? Lightning Data Service handles sharing rules and field-level security. Lightning Data Service ignores field-level security. The with sharing keyword must be used to enforce sharing rules. The isAccessible( ) method must be used for field-level access checks.
Which annotation exposes an Apex class as a RESTful web service? RemoteAction @AuraEnabled @RestResource @HttpInvocable.
Which two characteristics are true for Aura component events? Choose 2 answers. Depending on the current propagation phase, calling event.stopPropagation() may not stop the event propagation. The event propagates to every owner in the containment hierarchy. By default, containers can handle events thrown by components they contain. If a container component needs to handle a component event, add a handleFacets="true" attribute to its handler.
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 the 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 2 answers. Query for existing opportunities outside of the for loop. Check if all the required fields for Opportunity are being added on creation. Use Database.query to query the opportunities. Move the DML that saves opportunities outside of the for loop.
Report abuse