Platform Developer 1 New

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

A, C

1. A developer wishes to streamline the setting up of data for their test class. How could this be achieved? (Select 2) A· Create a class specifically to create data for test methods B· Utilise the @isTest(SeeAllData=true) annotation C· Add a @TestSetup annotated method to the class D· Use the @isTest(isParallel=true) annotation

A

10. Which of the following statements should be added to the following for loop to exit the loop - on line 10 - when a matching record is first found? A· break; B· exit; C· continue; D· goto start;

B

11. How can we best reference external resources (e.g. CSS or JavaScript) within Lightning Components and Visualforce pages? A· Upload the resources to a CDN and reference them via link tags within our markup B· Upload them as Static Resources C· Upload them as External Resources D· Add links to our markup pointing to the external resources

D

12. Which of the following uses the correct naming convention to be used for naming CustomEvent fired from Lightning Web Components using dispatch event? A· onMyAction B· myAction C· my action D· my_action

B

13. As a developer you wish to build a reusable Lightning Web Component which can be used to search records and to select one. Which snippet can this component alert its parent component to the selected record? A· this.template.dispatchEvent(new CustomEvent("my_event", {detail: this.recordId})) B· this.dispatchEvent(new CustomEvent("my_event", {detail: this.recordId})) C· this.template.host.dispatchEvent(new CustomEvent("my_event", {detail: this.recordId})) D· this.dispatchEvent(new CustomEvent("my_event", {recordID: this.recordId}))

C

14. A developer creates an Apex trigger which calls a method within another class. A test has been written which directly calls the method within the class and provides 100% code coverage. There are no other Apex classes present within the org. What would be the result of deploying a changeset with this trigger and classes into production with running all tests? A· The deployment succeeds due to code coverage being above 75% B· The deployment succeeds due to the total number of lines covered by tests in the deployment being above 75% C· The deployment fails because the Apex trigger has 0% code coverage D· The deployment fails as the not every component in the deployment has 75% code coverage

A

15. Which of the following snippets can be used to obtain the Stage picklist values on the Opportunity object? A· Opportunity.StageName.getDescribe().getPicklistValues(); B· Opportunity.StageName.getMetadata().getPicklistMetadata(); C· Opportunity.StageName.getDescribe().getPicklistDescribe (); D· Opportunity.StageName.getDescribe().getPicklistOptions();

A, C

16. How can a developer schedule an Apex job? (Select 2) A· Use the Apex Scheduler B· Use the Scheduler API C· Use the System.schedule() method within Apex D· Use the System.enqueJob() method within Apex

B

17. A developer has many records which must be displayed on a Visualforce page, how can they best add pagination? A· Use the OFFSET clause in their SOQL query B· Utilise the StandardSetController built-in methods C· Utilise the StandardController built-in methods D· Utilise the StandardPaginationController built-in methods

C

18. How can data for a record be easily accessed in Lightning Components? A· Utilise the standard Lightning Component Controller B· Write an @AuraEnabled Apex methods to return the data C· Utilise the Lightning Data Service D· Use fetch requests within the component to call the Salesforce APIs

D

19. There is a trigger on the Contact object which causes an update on the parent Account object. The Account update uses an update DML statement and triggers a validation rule. Which of the following statements is true? A· The Contact record is update but the Account is not B· The Account trigger is rolled back C· The Account record is updated but Contact record is no D· The entire transaction is rolled back

D

2. You have been tasked with writing a utility class which can be called from multiple contexts, for example while running as an Experience User and an internal user who should see all records. Which sharing declaration should be used in your class to facilitate this? A· With sharing B· Without sharing C· Implicit sharing D· Inherited sharing E· None

A, C, F, G

20. What benefits are there to using the Lightning Web Component Framework? (Choose 4) A· Faster development B· Interoperability with popular frameworks such as React or Vue C· Performance D· Client-side or server-side rendering E· Can utilise NPM modules F· Out-of-the-box components G· Built upon web standards

A

21. You have been tasked with importing data from a legacy CRM system into a new Salesforce org. The legacy CRM system had database tables analogous to the Account, Contact and Opportunity objects within Salesforce. How could you best ensure the relationships are preserved during this data migration? A· Add fields flagged as external Ids for each of the objects to be imported, populated with its legacy CRM Id, use the Data Loader tool, and set the relationship fields to match these external Ids B· Add fields flagged as external Ids for each of the objects to be imported, populated with its legacy CRM Id, write a script to re-establish relationships after import C· Add a field to each object for its legacy CRM Id, after importing each object, export them and use a VLOOKUP function in Excel to match the Ids D· Add a field to each object for its legacy CRM Id, write an Apex trigger that on insert matches the record to its parent

B

22. What is the maximum number of records that can be processed by a trigger at a time? A· 100 B· 200 C· 1000 D· 2000 E· Unlimited

D

23. There are two before save triggers defined for the Contact object, which one of them runs first? A· The trigger which was created first B· The trigger which was created last C· Both execute together D· The order is random

D

24. Which of the following isn't true about Visualforce standard controllers? A· Controllers can either be tied to a single record, or a collection of records B· Field level and object level security is enforced by built in actions C· They can be extended to provide customised logic D· Standard controllers only exist for custom objects

A

25. Can Lightning Components subscribe to Platform Events? A· Yes B· No

B

3. You have a Visualforce page displaying an Opportunity record. You wish to display details about the Account record linked to this Opportunity. This page utilises the standard controller. How could you add the Account name to the page? A· Create a controller extension which queries the required details on Account B· Reference the Account fields using {!opportunity.Account.fieldName} C· Replace the standard controller with the standard relationship controller D· Write a custom controller to query all required records

D

4. As a developer, you wish to utilise scratch orgs to streamline the development process within your team. What are the requirements to do this? A· Enable Dev Hub B· Have a user with permissions to create Scratch Orgs C· Have the Salesforce CLI setup D· All of the above

C

5. What is the value of "foo" after this following code has been executed? A· 10 B· 20 C· 30 D· 40

C

6. What is the result if the following trigger is executed for 50 records? A· The records are updated to have the MyField__c value of "TRUE" B· The first record is updated to have the MyField__c value of "TRUE" C· A runtime exception is thrown D· The code will not compile

B

7. Which of the following statements is true about sharing keywords of Apex classes? A· Inner classes inherit the sharing mode from the outer class B· Inner classes do not inherit the sharing mode from the outer class C· Inner classes must match their outer classes sharing mode D· Inner classes must always use with sharing

C

8. A developer wishes to add a picklist to a Lightning Web Component they are building. Which of the following snippets should they use? A. <lightning-input type="combobox"></lightning-input> B.· <lightning-input type="picklist"></lightning-input> C· <lightning-combobox></lightning-combobox> D· <lightning-picklist></lightning- picklist > E· <lightning:combobox/ > F· <lightning:select/>

C

9. You are working for a large paint distributor and have been requested that whenever an Opportunity is created with a value over £10000 to automatically set the owner to the Sales Team Leader. What automation tool is best suited to this task? A· Use a Workflow Rule B· Use a Process Builder C· Use a Flow D· Write an Apex Trigger

D, E

A Licensed_Professional__c custom object exists in the system with two Master-Detail fields for the following objects: Certification__c and Contact. Users with the "Certification Representative" role can access the Certification records they own and view the related Licensed Professionals records, however users with the "Sales Representative" role report they cannot view any Licensed Professional records even though they own the associated Contact record. What are two likely causes of users in the "Sales Representative" role not being able to access the Licensed Professional records? A. The organization recently modified the Sales Representative role to restrict Read/Write access to Licensed_Professional__c B. The organization recently modified the Sales Representative role to restrict Read access to Licensed_Professional__c C. The organization has a private sharing model for Certification__c, and Contact is the primary relationship in the Licensed_Professional__c object. D. The organization has a private sharing model for Certification__c. and Certification__c is the primary relationship in the Licensed_Professional__c object. E. The organization's sharing rules for Licensed_Professional__c have not finished their recalculation process.

B

A developer needs to implement the functionality for a service agent to gather multiple pieces of information from a customer in order to send a replacement credit card. Which automation tool meets these requirements? Options: A. Lightning Component B. Flow Builder C. Process Builder D. Approval Process

D

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 its 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? A. Declare the class and method using the public access modifier. B. Declare the class as global and use the public access modifier on the method. C. Declare the class as public and use the global access modifier on the method. D. Declare the class and method using the global access modifier.

D

How can a developer check the test coverage of active Process Builder and Flows deploying them in a Changing Set? A. Use the Flow properties page. B. Use the code Coverage Setup page C. Use the Apex testresult class D. Use SOQL and the Tooling API

B, E, F

What are three characteristics of change set deployments? A. Deployment is done in a one-way, single transaction. B. Change sets can only be used between related organizations. C. Change sets can deploy custom settings data. D. Change sets can be used to transfer records. E. Sending a change set between two orgs requires a deployment connection. F. All or none deployment model

C

What is a fundamental difference between a Master-Detail relationship and a Lookup relationship? A. In a Master-Detail relationship, when a record of a master object is deleted, the detail records are not deleted. B. In a Lookup relationship when the parent record is deleted, the child records are always deleted. C. A Master-Detail relationship detail record inherits the sharing and security of its master record. D. In a Lookup relationship, the field value is mandatory.

C, D

What is an example of a polymorphic lookup field in salesforce? A. The Parentid field on the standard Account object B. A custom field, Link_c, on the standard Contact object that looks up to an Account or a Campaign C. The WhatId field on the standard Event object D. The Leadid and Contactid fields on the standard Campaign Member object

C

What will be the output in the debug log in the event of a QueryException during a call to the aQuery method in the following example? class myclass { class CustomException extends QueryException {} public static Account aQuery () { Account theAccount; try { system.debug('Querying Accounts.'); theAccount = [SELECT Id FROM Account WHERE CreatedDate > TODAY]; } catch(CustomException ex) { system.debug ('Custom Exception. '); } catch(QueryException ex) { system.debug ('Query Exception.'); } finally { system.debug ('Done.'); } return theAccount; }} A. Querying Accounts.Query Exception. B. Querying Accounts.Custom Exception. C. Querying Accounts.Custom Exception.Done. D. Querying Accounts.Query Exception. Done.

B

Which code in a Visualforce page and/or controller might present a security vulnerability? A. <apex: outputField value = "{!ctrl.userInput}" > B. <apex outputText value = "{!$CurrentPage.parameters.userInput}"> C. <apex:outputText escape = "false" value = "{!$CurrentPage.parameters.userInput}"> D. <apex:outputField escape-"false" value = "{!ctrl.userInput}" >

A, B, C

Which three salesforce resources can be accessed from a lightning web component? A. Static Resources B. Content file assets C. SVG Resources D. Third-Party Web component​

C

​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? A. Salesforce CLI B. AppExchange C. Developer Console D. Visual Studio Core IDE


Kaugnay na mga set ng pag-aaral

Stability & Range of Motion Practice

View Set

Peds - Exam 4 - Practice Q's w/ rationale

View Set

Econ and Personal Finance Vocabulary Unit 2 Credit

View Set

Chapter 8 & 9 - Communicating Professionally, Working with an Individual Patient

View Set

Amino Acids and their mRNA Codons

View Set