Quizz certification SET1 Flashcards

1
Q

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

A.Use a MAX Roll-Up Summary field on the latest availability date field

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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.

A

C . View Use code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

D. Lightning Pages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

A

B.Scratch orgs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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>

A

D. <lightning-input-field>
</lightning-input-field>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

B. global inherited sharing class ProcessAccountProcessor implements Schedulable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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’

A

B. FIND ‘Universal Containers’ IN Name Fields RETURNING lead(id, name), account (id, name), contact(id, name)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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.

A

C. Use the with sharing keyword on the class declaration.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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.

A

D. Use Security.stripInaccessible to remove fields inaccessible to the current user.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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

A. Avoid performing queries inside for loops.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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()

A

C. fire()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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.

A

C. Create a junction object between Orderltem and Order.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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

A

B. Model-View-Controller (MVC)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A. Add a new Create Records element.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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.

A

D. Declare maxAttempts as a constant using the static and final keywords.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

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.AppExchange

B.Salesforce CLI

C.Visual Studio Core IDE

D.Developer Console

A

D.Developer Console

17
Q

What should a developer use to script the deployment and unit test execution as part of continuous integration??
A. Developer Console
B. Salesforce CLI
C. Execute Anonymous
D. VS Code

A

B. Salesforce CLI

18
Q

Salesforce administrator used Flow Builder to create a flow named “accountOnboarding”. The flow must be used inside an Aura component.
Which tag should a developer use to display the flow in the component?

A. lightning-flow
B. aura-flow
C. lightning:flow
D. aura:flow

A

C. lightning:flow

19
Q

A developer wants to mark each Account in a List<Account> as either Active or Inactive, based on the value in the LastModifiedDate field
of each Account being greater than 90 days in the past.
Which Apex technique should the developer use?
A. A for loop, with a switch statement inside
B. A switch statement, with a for loop inside
C. A for loop, with an if or if/else statement inside
D. An if-else statement, with a for loop inside</Account>

A

C. A for loop, with an if or if/else statement inside

20
Q

Which action may cause triggers to fire?
A. Renaming or replacing a picklist entry
B. Changing a user’s default division where the transfer division option is checked
C. Cascading delete operations
D. Updates to Feed Items

A

D. Updates to Feed Items

21
Q

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 ?
A. Lightning Web Components
B. Flow
C. VUE Javascript framework
D. Visualforce

A

A. Lightning Web Components

22
Q

Which scenario is valid for execution by unit tests ?
A. Execute anonymous Apex as a different user.
B. Generate a Visualforce PDF with getContentAsPDF().
C. Load data from a remote site with a callout.
D. Set the created date of a record using a system method.

A

D. Set the created date of a record using a system method.

23
Q

A developer created this Apex trigger that calls MyClass.myStaticMethod:
~~~
trigger myTrigger on Contact(before insert)
{ MyClass.myStaticMethod(trigger.new); }
~~~
The developer creates a test class with a test method that calls MyClass.myStaticMethod, 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?
A. The deployment fails because no assertions were made in the test method.
B. The deployment passes because both classes and the trigger were included in the deployment.
C. The deployment passes because the Apex code has required (>75%) code coverage.
D. The deployment fails because the Apex trigger has no code coverage.

A

D. The deployment fails because the Apex trigger has no code coverage.

24
Q

Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won stage.
How should a developer accomplish this ?
A. Use a validation rule.
B. Use the Process Automation settings
C. Use Flow Builder.
D. Mark fields as read-only on the page layout.

A

A. Use a validation rule.

25
Q

How can a developer check the test coverage of autolaunched Flows before deploying them in a change set?
A. Use the Flow Properties page
B. Use the ApexTestResult class
C. Use SOQL and the Tooling API
D. Use the Code Coverage Setup Page

A

C. Use SOQL and the Tooling API

26
Q

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?
A. Use the Streaming API to create real time roll-up summaries.
B. Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity.
C. Use the Metadata API to create real-time roll-up summaries
D. Write a trigger on the Opportunity object and use tree sorting to sum the amount for all related child object under the Opportunity.

A

B. Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity.

27
Q

A developer wrote Apex code that calls out to an external system using REST API.
How should a developer write the test to prove the code is working as intended?
A. Write a class that implements HTTPCalloutMock
B. Write a class that extends HTTPCalloutMock.
C. Write a class that extends WebserviceMock.
D. Write a class that implements the WebserviceMock

A

A. Write a class that implements HTTPCalloutMock

28
Q

A developer must provide custom user interfaces when users edit a Contact in either Salesforce Classic or Lightning Experience.
What should the developer use to override the Contact’s Edit button and provide this functionality ?
A. A Visualforce page in Salesforce Classic and a Lighting component in Lightning Experience
B. A Lightning page in Salesforce Classic and a Visualforce page in Lightning Experience
C. A Lightning component in Salesforce Classic and a Lightning component in Lightning Experience
D. A Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience

A

A. A Visualforce page in Salesforce Classic and a Lighting component in Lightning Experience

29
Q

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?
A.
public class CreditCardPayment implements Payment{ public override void makePayment(Decimal amount){/*implementation*/} }
B.
public class CreditCardPayment implements Payment{ public virtual void makePayment(Decimal amount){/*implementation*/} }
C.
public class CreditCardPayment extends Payment{ public override void makePayment(Decimal amount){/*implementation*/} }
D.
public class CreditCardPayment extends Payment{ public virtual void makePayment(Decimal amount){/*implementation*/} }

A

C.public class CreditCardPayment extends Payment{ public override void makePayment(Decimal amount){/*implementation*/} }

30
Q

What does the Lightning Component framework provide to developers?
A. Extended governor limits for applications
B. Templates to create custom components
C. Support for Classic and Lightning UIs
D. Prebuilt components that can be reused

A

D. Prebuilt components that can be reused