Quizz certification SET1 Flashcards
Universal Containers UC) uses out-of-the-box order management, that has a Master-Detail relationship between Order and Order Line Item. UC Stores the availability date on each Order Line Item and Orders are only shipped when all of the Order Line Items are available. Which method should be used to calculate the estimated ship date for an Order ?
A.Use a MAX Roll-Up Summary field on the latest availability date field
B. Use a LATEST formula on each of the latest availability date fields.
C. Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summavy field on the Order.
D. Use a CEILING formula on each of the latest availability date fields.
A.Use a MAX Roll-Up Summary field on the latest availability date field
What should a developer do to check the code coverage of a class after running all tests?
A . View the Code Coverage column in the list view on the Apex Classes page.
B . View the Class Test Percentage tab on the Apex Class fist view in Salesforce Setup.
C . View Use code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab.
D . Select and run the class on the Apex Test Execution page in the Developer Console.
C . View Use code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab.
What can be easily developed using the Lightning Component framework?
A. Customized JavaScript buttons
B. Salesforce Classic user interface pages
C. Salesforce integrations
D. Lightning Pages
D. Lightning Pages
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?
A.Developer sandboxes
B.Scratch orgs
C.Full Copy sandboxes
D.Developer orgs
B.Scratch orgs
A developer must create a Lightning component that allows users to input Contact record information to create a Contact record, including a
Salary_c custom field.
What should the developer use, along with a lightning-record-edit-form, so that Salary_c field functions as a currency input and is only
viewable and editable by users that have the correct field level permissions on salary?
A.<lightning-formmatted-number>
</lightning-formatted-number>
B.<lightning-input-currency>
</lightning-input-currency>
C.<lightning-input>
</lightning-input>
D. <lightning-input-field>
</lightning-input-field></lightning-formmatted-number>
D. <lightning-input-field>
</lightning-input-field>
A developer has a requirement to write Apex code to update a large number of account records on a nightly basis. The system administrator needs to be able to schedule the class to run after business hours on an as-needed basis.
Which class definition should be used to successfully implement this requirement?
A. global inherited sharing class ProcessAccountProcessor implements Database.Batchable, Schedulable
B. global inherited sharing class ProcessAccountProcessor implements Schedulable
C. global inherited sharing class ProcessAccountProcesscr implements Database.Batchable
D. global inherited sharing class ProcessAccountProcessor implements Queueable
B. global inherited sharing class ProcessAccountProcessor implements Schedulable
What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name “Universal Containers”?
A. SELECT Lead.Id, Lead.Name, Account.Id, Account.Name, Contact.Id, Contact.Name FROM Lead, Account, Contact WHERE CompanyName = ‘Universal Containers’
B. FIND ‘Universal Containers’ IN Name Fields RETURNING lead(id, name), account (id, name), contact(id, name)
C. FIND ‘Universal Containers’ IN CompanyName Fields RETURNING lead(id, name), account (id, name), contact(id, name)
D. SELECT lead(id, name), account (id, name), contact(id, name) FROM Lead, Account, Contact WHERE Name = ‘Universal Containers’
B. FIND ‘Universal Containers’ IN Name Fields RETURNING lead(id, name), account (id, name), contact(id, name)
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?
A. Use the schema describe calls to determine if the logged-in user has access to the Account object.
B. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
C. Use the with sharing keyword on the class declaration.
D. Use the without sharing keyword on the class declaration.
C. Use the with sharing keyword on the class declaration.
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?
A. Use Lightning Data Service to get the collection of sales records.
B. use WITH SECURITY_ENFORCED in the SOQL that fetches the data for the component.
C. Use Lightning Locker Service to enforce sharing rules and field-level security.
D. Use Security.stripInaccessible to remove fields inaccessible to the current user.
D. Use Security.stripInaccessible to remove fields inaccessible to the current user.
Consider the following code snippet:
~~~
public static List<Lead> obtainAllFields(Set<Id> leadIds){
List<Lead> result = new List<Lead>();
for(ID leadID : leadIds){
result.add([SELECT FIELDS(STANDARD) FROM Lead WHERE Id=:leadId];
}
return result;
}
~~~
Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should implement and ensure successful execution of the method?
A. Avoid performing queries inside for loops.
B. Avoid executing queries without a limit clause.
C. Avoid using variables as query filters.
D. Avoid returning an empty List of records.</Lead></Lead></Id></Lead>
A. Avoid performing queries inside for loops.
Since Aura application events follow the traditional publish-subscribe model, which method is used to fire an event?
A. emit()
B. fireEvent()
C. fire()
D. registerEvent()
C. fire()
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?
A. Change the master-detail relationship to an external lookup relationship.
B. Add without sharing to the Apex class declaration.
C. Create a junction object between Orderltem and Order.
D. Select the Allow reparenting option on the master-detail relationship.
C. Create a junction object between Orderltem and Order.
A developer is designing a new application on the Salesforce platform and wants to ensure it can support multiple tenants effectively.
Which design framework should the developer consider to ensure scalabity and maintainability ?
A.Waterfall Model
B. Model-View-Controller (MVC)
C. Flux (view, action, dispatched and store)
D. Agile Development
B. Model-View-Controller (MVC)
An org has an existing Visual Flow that creates an Opportunity with an Update Records element. A developer must update the Visual Flow to also create a
Contact and store the created Contact’s ID on the Opportunity.
Which update should the developer make in the Visual Flow?
A. Add a new Create Records element.
B. Add a new Quick Action (of type Create) element.
C. Add a new Update Records element.
D. Add a new Get Records element.
A. Add a new Create Records element.
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?
A. Declare maxAttempts as a private static variable on a helper class.
B. Declare maxAttempts as a variable on a helper class.
C. Declare maxAttempts as a member variable on the trigger definition.
D. Declare maxAttempts as a constant using the static and final keywords.
D. Declare maxAttempts as a constant using the static and final keywords.