Which three code lines are required to create a Lightning component on a Visualforce page? Choose 3 answers
Correct Answer: A,C,D
Question 157
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?
Correct Answer: D
The developer should choose to use Data Loader instead of Data Import Wizard because Data Import Wizard cannot import more than 250 records at a time. Data Loader is a client application that can import up to five million records at a time, using either the user interface or the command line. Data Loader can also perform more complex operations, such as upsert, delete, and export. Data Import Wizard is a web-based tool that can import up to 50,000 records per file, but only 250 records per batch. Data Import Wizard can also perform insert, update, and upsert operations, but not delete or export. Data Loader does not run from the developer's browser, but rather from the developer's machine. Data Import Wizard does support Opportunities, as well as other standard and custom objects. Data Loader does not automatically relate Opportunities to Accounts, but rather requires the developer to map the fields accordingly. References: * Salesforce Help: Data Import Wizard vs. Data Loader, page 1 * Salesforce Help: Data Loader Overview, page 1 * Trailhead: Platform Developer I Certification Study Guide: Data Modeling, unit 2
Question 158
When a task is created for a contact, how can a developer prevent the task from being included on the activity timeline of the contact's account record?
Correct Answer: B
Question 159
What are three capabilities of the <ltng : require> tag when loading JavaScript resources in Aura components? Choose 3 answers
Correct Answer: B,C,E
The <ltng : require> tag is a Lightning component that allows you to load external CSS and JavaScript libraries in your Aura components. The <ltng : require> tag has the following capabilities: * One-time loading for duplicate scripts: The <ltng : require> tag ensures that the same script or style resource is loaded only once, even if it is specified in multiple <ltng : require> tags in the same component or across different components. This avoids unnecessary loading and potential conflicts. * Specifying loading order: The <ltng : require> tag allows you to specify the order in which the scripts and styles are loaded, by using comma-separated lists in the scripts and styles attributes. The resources are loaded in the order you specify them, which is important for maintaining dependency order and avoiding errors. * Loading externally hosted scripts: The <ltng : require> tag enables you to load scripts that are hosted on external servers, such as CDN or third-party services, by using the full URL of the script in the scripts attribute. This can be useful for accessing libraries that are not available as static resources in Salesforce. References: ltng:require - documentation, Using External JavaScript Libraries, Prepare for Your Salesforce Platform Developer I Credential
Question 160
niversal Containers (UC) processes orders in Salesforce in a custom object, Crder_c. They also allow sales reps to upload CSV files with of orders at a time. A developer is tasked with integrating orders placed in Salesforce with UC's enterprise resource planning (ERP) system. 'After the status for an Craer__c is first set to "Placed', the order information must be sent to a REST endpoint in the ERP system that can process ne order at a time. What should the developer implement to accomplish this?
Correct Answer: D
The developer should implement a callout from a queueable class called from a trigger to accomplish this. A callout is a request that is sent from Salesforce to an external service, such as a REST endpoint in the ERP system1. A queueable class is an Apex class that implements the Queueable interface and can be executed asynchronously by adding it to the Apex job queue2. A trigger is an Apex script that executes before or after specific data manipulation language (DML) events on a Salesforce object, such as insert, update, or delete3. The reason why this option is the best is because: * A callout from a future method called from a trigger (option A) is not recommended, because future * methods have some limitations, such as not being able to pass sObjects as parameters, not being able to chain future calls, and not being able to monitor the status of the execution4. * A callout from a schedulable class called from a scheduled job (option B) is not suitable, because scheduled jobs run at a specified time or interval, and not in response to a data change event, such as setting the order status to "Placed"5. * A flow with a callout from an invocable method (option C) is not feasible, because flows cannot be triggered by data changes, but only by user actions, such as clicking a button, or by process automation tools, such as Process Builder or Workflow. References: * 1: Callouts | Apex Developer Guide | Salesforce Developers * 2: Queueable Apex | Apex Developer Guide | Salesforce Developers * 3: Triggers | Apex Developer Guide | Salesforce Developers * 4: Using the Future Annotation | Apex Developer Guide | Salesforce Developers * 5: Schedulable Interface | Apex Developer Guide | Salesforce Developers * : [Flow Trigger Workflow Actions | Salesforce Help]