
Pass Salesforce CRT-450 With GuideTorrent Exam Dumps - Updated on Nov-2023
Fully Updated CRT-450 Dumps - 100% Same Q&A In Your Real Exam
NEW QUESTION # 57
Universal Containers recently transitioned from Classic to Lighting Experience. One of its business processes requires certain value from the opportunity object to be sent via HTTP REST callout to its external order management system based on a user-initiated action on the opportunity page. Example values are as follow Name Amount Account Which two methods should the developer implement to fulfill the business requirement? (Choose 2 answers)
- A. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page.
- B. Create a Process Builder on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity is updated.
- C. Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.
- D. Create an after update trigger on the Opportunity object that calls a helper method using @Future(Callout=true) to perform the HTTP REST callout.
Answer: A,D
NEW QUESTION # 58
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 notbe 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 System.executionContext =='Trigger'.
- B. Checkif Trigger.isExecuting ==true
- C. Check if Trigger.newMap !=null.
- D. Use the executeOnTrigger annotation on the method definition.
Answer: B
NEW QUESTION # 59
Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won stage.
How should a developer accomplish this?
- A. Mark fields as read-only on the page layout.
- B. Use the Process Automation settings.
- C. Use Flow Builder.
- D. Use a validation rule.
Answer: D
NEW QUESTION # 60
A developer created this Apex trigger that calls MyClass.myStaticMethod:
trigger myTrigger on Contact(before insert)
{ MyClass.myStaticMethod(trigger.new, trigger.oldMap); }
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 passes because both classes and the trigger were included in the deployment.
- B. The deployment fails because no assertions were made in the test method.
- C. The deployment fails because the Apex trigger has no code coverage.
- D. The deployment passes because the Apex code has required (>75%) code coverage.
Answer: C
NEW QUESTION # 61
Why would a developer consider using a custom controller over a controller extension?
- A. Toincrease the SOQL query governor limits.
- B. To leverage built-in functionality of a standard controller
- C. To implement all of the logic for a page and bypass default Salesforce functionality
- D. To enforce user sharing settings and permissions
Answer: C
NEW QUESTION # 62
A developer is creating a Visualforce page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default Opportunity record type, and set certain default values based on the record type before inserting the record. How can the developer find the current user's default record type?
- A. Use Opportunity.SObjectType.getDescribe().getRecordTypeInfos() to get a list of record types, and iterate trought them until isdefaultRecordTypeMapping() is true.
- B. Query the Profile where the ID equals userInfo.getProfileID() and then use the profile.Opportunity.getDefaultRecordType() method.
- C. Use the Schema.userInfo.Opportunity.getDefaultRecordType() method.
- D. Create the opportunity and check the opportunity.recordType before inserting, which will have the record ID of the current user's default record type
Answer: A
NEW QUESTION # 63
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 with sharing keyword on the class declaration.
- B. Use the schema describe calls to determine if the logged-in users has access to the Account object.
- C. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
- D. Use the without sharing keyword on the class declaration.
Answer: A
NEW QUESTION # 64
Which two statements can a developer use to throw a custom exception of type MissingFieldValueException? Choose 2 answers.
- A. Throw new MissingFieldValueException ('Problem occurred');
- B. Throw new MissingFieldValueException();
- C. Throw Exception (new MissingFieldValueException());
- D. Throw (MissingFieldValueException, 'Problem occurred');
Answer: A,B
NEW QUESTION # 65
The sales management team at Universal Container requires that the Lead Source field of the Lead record be populated when a.. converted.
What should be done to ensure that a user populates the Lead Source field prior to converting a Lead?
- A. Create an after trigger on Lead.
- B. Use a formula field.
- C. Use a validation rule.
- D. Use Lead Conversation field mapping.
Answer: C
NEW QUESTION # 66
A developer has a block of code that omits any statements that indicate whether the code block should execute with or without sharing. What will automatically obey the organization-wide defaults and sharing settings for the user who executes the code in the Salesforce organization?
- A. Anonymous Blocks
- B. Apex Controllers
- C. HTTP Callouts
- D. Apex Triggers
Answer: A
NEW QUESTION # 67
Given the code below, what can be done so that recordcount can be accessed by a test class, but not by a non-test class? Public class mycontroller{ private integer recordcount; }
- A. Add the testvisible annotation to recordcount
- B. Add the testvisible annotation to the mycontroller class
- C. Add a seealldata annotation to the test class
- D. Change recordcount from private to public
Answer: A
NEW QUESTION # 68
A Lightning component has a wired property, searchResults, that stores a list of Opportunities. Which definition of the Apex method, to which the searchResults property is wired, should be used?
- A. @AuraEnabled(cacheable=true) public List<Opportunity> search(String term) { /*implementation*/ }
- B. @AuraEnabled(cacheable=false) public static List<Opportunity> search(String term) { /*implementation*/ }
- C. @AuraEnabled(cacheable=false) public List<Opportunity> search(String term) { /*implementation*/ }
- D. @AuraEnabled(cacheable=true)
public static List<Opportunity> search(String term) { /* implementation*/ }
Answer: D
NEW QUESTION # 69
A Lightning component has a wired property, searcResults, that stores a list of Opportunities. Which definition of the Apex method, to which the searchResults property is wired, should be used?
- A. @AuraEnabled(cacheable=false)
public static List<Opportunity> search(String term) { /*implementation*/ } - B. @AuraEnabled(cacheable=true)
public static List<Opportunity> search(String term) { /* implementation*/ } - C. @AuraEnabled(cacheable=false)
public List<Opportunity> search(String term) { /*implementation*/ } - D. @AuraEnabled(cacheable=true)
public List<Opportunity> search(String term) { /*implementation*/ }
Answer: B
NEW QUESTION # 70
A developer wants to invoke an outbound message when a record meets a specific criteria.
Which three features satisfy this use case? (Choose three.)
- A. Visual Workflow can be used to check the record criteria and send an outbound message without Apex Code.
- B. Workflows can be used to check the record criteria and send an outbound message.
- C. Process builder can be used to check the record criteria and send an outbound message without Apex Code.
- D. Approval Process has the capability to check the record criteria and send an outbound message without Apex Code.
- E. Process builder can be used to check the record criteria and send an outbound message with Apex Code.
Answer: A,B,D
Explanation:
Explanation/Reference:
NEW QUESTION # 71
How can a developer get all of the available record types for the current user on the Case object?
- A. Use DescribeSObjectResult of the Case object.
- B. Use Case.getRecordTypes().
- C. Use DescribeFieldResult of the Case.RecordType field.
- D. Use SOQL to get all Cases.
Answer: C
Explanation:
Explanation
NEW QUESTION # 72
Which statement results in an Apex compiler error?
- A. List<string> s = List<string>{'a','b','c');
- B. Map<Id,Leas> lmap = new Map<Id,Lead>([Select ID from Lead Limit 8]);
- C. Integer a=5, b=6, c, d = 7;
- D. Date d1 = Date.Today(), d2 = Date.ValueOf('2018-01-01');
Answer: A
NEW QUESTION # 73
Which code displays the contents of a Visualforce page as a PDF?
- A. <apex:page contentType="application/pdf">
- B. <apex:page rendersAs="application/pdf">
- C. <apex:page contentType="pdf">
- D. <apex:page renderAs="pdf">
Answer: D
Explanation:
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_output_pdf_renderas.htm You can generate a downloadable, printable PDF file of a Visualforce page using the PDF rendering service. Convert a page to PDF by changing the <apex:page> tag.
<apex:page renderAs="pdf">
NEW QUESTION # 74
Universal Container(UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The Developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called
"Global Address". Which field should the developer ad to create the most efficient model that supports the business need?
- A. Add a Master-Detail field on the Global Address object to the Account object.
- B. Add a Master-Detail field on the Account object to the Global Address object
- C. Add a Lookup field on the Global Address object to the Account object
- D. Add a Lookup field on the Account object to the Global Address object.
Answer: D
NEW QUESTION # 75
A developer wrote Apex code that calls out to an external system.
How should a developer write the test to provide test coverage?
- A. Write a class that extends HTTPCalloutMock.
- B. Write a class that extends WebserviceMock.
- C. Write a class that implements the HTTPCalloutMockinterface.
- D. Write a class that implements the WebserviceMockinterface.
Answer: C
NEW QUESTION # 76
Which two Apex data types can be used to reference a Salesforce record ID dynamically? (Choose two.)
- A. ENUM
- B. sObject
- C. External ID
- D. String
Answer: A,D
NEW QUESTION # 77
Given the code block: Integer x; for (x =0; x<10; x+=2){
if (x==8) break; if (x==10) break;
} system.debug(x); Which value will the system.debug display?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: D
NEW QUESTION # 78
A developer needs to create a custom visualforce button for the opportunity object page layout that will cause a web service to be called and redirect the user to a new page when clicked.
Which three attributes need to be defined in the <apx:page> tag of the visualforce page to enable this functionality?
- A. Extensions
- B. AcTion
- C. Readonly
- D. Renderas
- E. Standardcontroller
Answer: A,B,E
NEW QUESTION # 79
......
Latest CRT-450 Exam Dumps - Valid and Updated Dumps: https://www.guidetorrent.com/CRT-450-pdf-free-download.html
Verified CRT-450 Exam Questions Certain Success: https://drive.google.com/open?id=10rrm3b5DlKtknmgzzXRWZ4lftwPDkja_