Guaranteed Success in Salesforce Developers CRT-450 Exam Dumps
Salesforce CRT-450 Daily Practice Exam New 2023 Updated 171 Questions
NEW QUESTION # 67
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 permission for the currently logged-in user while using the custom search tool?
- A. Use the without sharing keyword on the class declaration.
- B. Use the with sharing keyword on the class declaration.
- C. Use the schema describe calls to determine if the logged-in users has access to the Account object.
- D. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
Answer: B
Explanation:
Use the with sharing keyword on the class declaration. The with sharing keyword ensures that the Apex code respects the object-level, field-level, and record-level sharing settings for the user who is running the Apex code. This means that the code will only return records that the user has access to, according to their Sharing Settings. You can find more information about the with sharing keyword in the official Salesforce documentation (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm).
NEW QUESTION # 68
Which two number expressions evaluate correctly? (Choose two.)
- A. Long l = 3.14159;
- B. Double d = 3.14159;
- C. Decimal d = 3.14159;
- D. Integer I = 3.14159;
Answer: B,C
NEW QUESTION # 69
A developer created a helper class with a method that can be called from Visualforce pages, web services, triggers, and of even anonymous code. When the method is called from a trigger, the developer needs to execute logic that should not be executed If the method Is called from anywhere else. How can the developer determine if the code Is executed in a trigger context?
- A. Check if Trigger.newMap !=null.
- B. Check if System.executionContext =='Trigger'.
- C. Check if Trigger.isExecuting ==true
- D. Use the executeOnTrigger annotation on the method definition.
Answer: C
NEW QUESTION # 70
What is true for a partial sandbox that is not true for a full sandbox? Choose 2 answers:
- A. Use of change sets.
- B. Limited to 5 GB of data.
- C. Only Includes necessary metadata.
- D. More frequent refreshes.
Answer: B,D
NEW QUESTION # 71
Which two statements accurately represent the MVC framework implementation in Salesforce? Choose 2 answers
- A. Standard and Custom objects used in the app schema represent the View (V) part of the MVC framework
- B. Lightning component HTML files represent the Model (M) part of the MVC framework.
- C. Validation rules enforce business rules and represent the Controller (C) part of the MVC framework
- D. Triggers that create records represent the Model (M) part of the MVC framework.
Answer: C,D
NEW QUESTION # 72
A developer has two custom controller extensions where each has a save() method.
Which save() method will be called for the following Visualforce page?
<apex:page standardController ="Account", extensions="ExtensionA, ExtensionB">
<apex:commandButton action ="{!save}" value="Save"/>
</apex:page>
- A. Standard controller save()
- B. ExtensionB save()
- C. Runtime error will be generated
- D. ExtensionA save()
Answer: C
NEW QUESTION # 73
Universal Containers has large number of custom applications that were built using a third-party javaScript framework and exposed using Visualforce pages. The Company wants to update these applications to apply styling that resembles the look and feel of Lightning Experience. What should the developer do to fulfill the business request in the quickest and most effective manner?
- A. Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications.
- B. Enable Available for Lightning Experience, Lightning Comminities, and the mobile app on Visualforce pages used by the custom application.
- C. Rewrite all Visualforce pages asLightning components.
- D. Set the attribute enableLightning to treu in the definition.
Answer: D
NEW QUESTION # 74
Refer to the following code snippet for an environment has more than 200 Accounts belonging to the Technology' industry:
When the code execution, which two events occur as a result of the Apex transaction?
When the code executes, which two events occur as a result of the Apex transaction?
Choose 2 answers
- A. The Apex transaction fails with the following message. "SObject row was retrieved via SOQL without querying the requested field Account.Is.Tech__c''.
- B. If executed in an asynchronous context, the apex transaction is likely to fall by exceeding the DML governor limit
- C. The Apex transaction succeeds regardless of any uncaught exception and all processed accounts are updated.
- D. If executed In a synchronous context, the apex transaction is likely to fall by exceeding the DHL governor limit.
Answer: A
NEW QUESTION # 75
A developer has to identify a method in en 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 SOQL 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
- A. Use the Database.Savepoint method to enforce database integrity.
- B. Use the System.Limit class to monitor the current CPU governor limit consumption.
- C. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.
- D. Use Partial DHL statements to ensure only valid data is committed.
Answer: A,B
NEW QUESTION # 76
Which two components are available to deploy using the Metadata API? (Choose two.)
- A. Web-to-Case
- B. Case Settings
- C. Lead Conversion Settings
- D. Web-to-Lead
Answer: B,C
NEW QUESTION # 77
A sales manager wants to make sure that whenever an opportunity stage is changed to 'Closed Won', a new case will be of created for the support team to collect necessary information from the customer.
How should a developer accomplish this?
- A. Set up a validation rule on the Opportunity Stage.
- B. Create a lookup field to the Case object on the opportunity object.
- C. Create a workflow rule to create the new case.
- D. Create a Process Builder to create the new case.
Answer: D
NEW QUESTION # 78
What is an accurate statement about variable scope? (Choose 3)
- A. Sub-blocks can reuse a parent block's variable name if it's value is null.
- B. Parallel blocks can use the same variable name.
- C. A static variable can restrict the scope to the current block of its value is null.
- D. Sub-blocks cannot reuse a parent block's variable name.
- E. A variable can be defined at any point in a block.
Answer: B,D,E
NEW QUESTION # 79
A developer creates an Apex class that includes private methods. What can the developer do to ensure that the private methods can be accessed by the test class?
- A. Add the TestVisible attribute to the apex methods.
- B. Add the SeeAllData attribute to the test methods.
- C. Add the SeeAllData attribute to the test class
- D. Add the TestVisible attribute to the Apex class
Answer: A
NEW QUESTION # 80
What is the maximum number of SOQL queries used by the following code? List<Account> aList =
[SELECT Id FROM Account LIMIT 5]; for (Account a : aList){ List<Contact> cList = [SELECT Id FROM Contact WHERE AccountId = :a.Id); }
- A. 0
- B. 1
- C. 2
- D. 3
Answer: C
NEW QUESTION # 81
An Apex transaction inserts 100 Account records and 2,000 Contact records before encountering a DML exception when attempting to insert 500 Opportunity records. The Account records are inserted by calling the database.insert() method with the allOrNone argument set to false. The Contact and Opportunity records are inserted using the standalone insert statement. How many total records will be committed to the database in this transaction?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: D
NEW QUESTION # 82
What are three ways for a developer to execute tests in an org? Choose 3.
- A. Tooling API
- B. Setup Menu
- C. Salesforce DX
- D. Metadata API.
- E. Bulk API
Answer: A,B,C
Explanation:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_testing.htm https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apextestsuite.htm
NEW QUESTION # 83
A develop created these three roll-up summary fields on the custom object. Project_c:
The developer is asked to create a new field that should the ratio between rejected and approved timesheet for a given project.
What are two benefits of choosing a formula held instead of an Apex trigger to fulfill the request? Choose 2 answers
- A. A test class will validate the formula field during deployment.
- B. A formula field will calculate the retroactively for existing records
- C. A formula field will trigger existing automation when deployed.
- D. Using a formula field reduces maintenance overhead.
Answer: B,C
NEW QUESTION # 84
Which type of code represents the Model in the MVC architecture on the Force.com platform?
- A. Custom JavaScript that processes a list of Account records.
- B. A Controller Extension method that uses SOQL to query for a list of Account records
- C. A Controller Extension method that saves a list of Account records
- D. A list of Account records returned from a Controller Extension method
Answer: D
NEW QUESTION # 85
Which query 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. FIND 'Universal Containers' IN CompanyName Fields RETURNING lead(id,name), account (id,name), contact(id,name)
- B. SELECT Lead.id, Lead. Name, Account.id, Account.Name, Contact.Id, Contact. Name FROM Lead, Account, Contact WHERE CompanyName = 'Universal Containers'
- C. IND 'Universal Containers' IN Name 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'
Answer: C
NEW QUESTION # 86
A developer must implement a CheckPaymentProcessorclass that provides check processing payment capabilities that adhere to what is defined for payments in the PaymentProcessorinterface.
public interface PaymentProcessor {
void pay(Decimal amount);
}
Which is the correct implementation to use the PaymentProcessorinterface class?
public class CheckPaymentProcessor implements PaymentProcessor {
- A. publicvoid pay(Decimal amount);
public class CheckPaymentProcessor implements PaymentProcessor { - B. publicvoid pay(Decimal amount){}
public class CheckPaymentProcessor extends PaymentProcessor { - C. publicvoid pay(Decimal amount){}
public class CheckPaymentProcessor extends PaymentProcessor { - D. publicvoid pay(Decimal amount);
Answer: B
NEW QUESTION # 87
A developer uses a loop to check each Contact in a list. When a Contact with the Title of 'Boss' is found, the Apex method should jump to the first line of code outside of the for loop.
Which Apex solution will let the developer implement this requirement?
- A. return;
- B. continue;
- C. System.assert(false);
- D. break;
Answer: D
NEW QUESTION # 88
What are two ways a developer can get the status of an enquered job for a class that queueable interface? Choose 2 answers
- A. View the apex flex Queue
- B. View the apex Jobs page
- C. View the apex status Page
- D. Query the AsyncApexJobe object
Answer: A,D
NEW QUESTION # 89
A developer has JavaScript code that needs to be called by controller functions in multiple Aura components by extending a new abstract component.
Which resource in the abstract Aura component bundle allows the developer to achieve this?
- A. helper.js
- B. renderer.js
- C. controllers
- D. superRender.js
Answer: A
NEW QUESTION # 90
A developer created a child Lightning web component nested inside a parent Lightning web component, parent component needs to pass a string value to the child component.
In which two ways can this be accomplished?
Choose 2 answers
- A. The parent component can invoke a method in the child component
- B. The parent component can use a public property to pass the data to the child component.
- C. The parent component can use a custom event to pass the data to the child component,
- D. The parent component can use the Apex controller class to send data to the child component.
Answer: B,C
NEW QUESTION # 91
......
Test Engine to Practice CRT-450 Test Questions: https://www.torrentvce.com/CRT-450-valid-vce-collection.html
Use Valid CRT-450 Exam - Actual Exam Question & Answer: https://drive.google.com/open?id=1VQkZSOAykidwCWkGruUU-RXMJvK9rs6m