[2023] DEX-450 PDF Questions - Perfect Prospect To Go With Exam4Tests Practice Exam [Q55-Q78]

Share

[2023] DEX-450 PDF Questions - Perfect Prospect To Go With Exam4Tests Practice Exam

Salesforce DEX-450 Pdf Questions - Outstanding Practice To your Exam

NEW QUESTION # 55
Which governor limit applies to all the code in an apex transaction?

  • A. Elapsed CPU time
  • B. Number of classes called
  • C. Elapsed SOQL query time
  • D. Number of new records created

Answer: A


NEW QUESTION # 56
An org tracks customer orders on an Order object and the items of an Order on the Line Item object. The Line Item object has a MasterDetail relationship to the order object. A developer has a requirement to calculate the order amount on an Order and the line amount on each Line item based on quantity and price.
What is the correct implementation?

  • A. Implement the line amount as a numeric formula field and the order amount as a roll-up summary field.
  • B. Implement the Line amount as a currency field and the order amount as a SUM formula field.
  • C. Write a process on the Line item that calculates the item amount and order amount and updates the filed on the Line Item and the order.
  • D. Write a single before trigger on the Line Item that calculates the item amount and updates the order amount on the Order.

Answer: B


NEW QUESTION # 57
Which statement results in an Apex compiler error?

  • A. Integer a=5, b=6, c, d = 7;
  • B. List<string> s = List<string>{'a','b','c');
  • C. Map<Id,Leas> lmap = new Map<Id,Lead>([Select ID from Lead Limit 8]);
  • D. Date d1 = Date.Today(), d2 = Date.ValueOf('2018-01-01');

Answer: B


NEW QUESTION # 58
What is a benefit of developing applications in a multi-tenant environment?

  • A. Access to predefined computing resources
  • B. Enforced best practices for development
  • C. Unlimited processing power and memory
  • D. Default out-of-the-box configuration

Answer: D


NEW QUESTION # 59
Application Events follow the traditional publish-subscribe model. Which method is used to fire an event?

  • A. FireEvent()
  • B. RegisterEvent()
  • C. Emit()
  • D. Fire()

Answer: D


NEW QUESTION # 60
Which two statements true about Getter and Setter methods as they relate to Visualforce? Choose 2 answers

  • A. Setter methods always have to be declared global.
  • B. There is no guarantee for the order in which Getter or Setter methods are executed.
  • C. Setter methods can pass a value from a controller to a page.
  • D. Getter methods can pass a value from a controller to a page.

Answer: C,D


NEW QUESTION # 61
When is an Apex Trigger required instead of a Process Builder Process?

  • A. When an action needs to be taken on a delete or undelete, or before a DML operation is executed.
  • B. When a record needs to be created
  • C. When multiple records related to the triggering record need to be updated
  • D. When a post to Chatter needs to be created

Answer: A


NEW QUESTION # 62
A developer wrote a unit test to confirm that a custom exception works properly in a custom controller, but the test failed due to an exception being thrown. What step should the developer take to resolve the issue and properly test the exception?

  • A. Use database methods with all or none set to FALSE.
  • B. Use try/catch within the unit test to catch the exception.
  • C. Use Test.isRunningTest() within the customer controller.
  • D. Use the finally block within the unit test to populate the exception.

Answer: B


NEW QUESTION # 63
A developer needs to join data received from an integration with an external system with parent records in Salesforce. The data set does not contain the Salesforce IDs of the parent records, but it does have a foreign key attribute that can be used to identify the parent.
Which action will allow the developer to relate records in the data model without knowing the Salesforce ID?

  • A. Create and populate a custom field on the parent object marked as Unique
  • B. Create and populate a custom field on the parent object marked as an External ID.
  • C. Create a custom field on the child object of type Foreign Key
  • D. Create a custom field on the child object of type External Relationship.

Answer: D


NEW QUESTION # 64
A developer created these three Rollup Summary fields in the custom object, Project_ct,

The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project.
Which should the developer use to Implement the business requirement in order to minimize maintenance overhead?

  • A. Formula field
  • B. Apex Trigger
  • C. Record-triggered Flow
  • D. Process Builder

Answer: A


NEW QUESTION # 65
Which standard field needs to be populated when a developer inserts new Contact records programmatically?

  • A. LastName
  • B. FirstName
  • C. Accountld
  • D. Name

Answer: A


NEW QUESTION # 66
what are the three languages used in the visualforce page?

  • A. Apex, Json, SQL
  • B. Javascript, CSS, HTML
  • C. C++, CSS, query

Answer: B


NEW QUESTION # 67
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 view on the Apex Classes page.
  • B. View the Class test Coverage tab on the Apex Class record.
  • C. Select and run the class on the Apex Test Execution page
  • D. view the overall Code Coverage panel of the tab in the Developer Console.

Answer: B


NEW QUESTION # 68
A developer needs to prevent the creation of request records when certain conditions exist in the system. A RequestLogic class exists to checks the conditions. What is the correct implementation?

  • A. Trigger RequestTrigger on Request (after insert) {
    if (RequestLogic.isValid{Request})
    Request.addError {'Your request cannot be created at this time.'};
    }
  • B. Trigger RequestTrigger on Request (after insert) {
    RequestLogic.validateRecords {trigger.new};
    }
  • C. Trigger RequestTrigger on Request (before insert) {
    RequestLogic.validateRecords {trigger.new};
    }
  • D. Trigger RequestTrigger on Request (before insert) {
    if (RequestLogic.isvalid{Request})
    Request.addError {'Your request cannot be created at this time.'};
    }

Answer: C


NEW QUESTION # 69
Assuming that 'name; is a String obtained by an <apex:inputText> tag on a Visualforce page. Which two SOQL queries performed are safe from SOQL injections? Choose 2 answers

  • A. String query = '%' + name + '%';List<Account> results = [SELECT Id FROM Account WHERE Name LIKE :query];
  • B. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + String.escapeSingleQuotes(name) + '%\''; List<Account> results = Database.query(query);
  • C. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + name + '%\''; List<Account> results = Database.query(query);
  • D. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + name.noQuotes() + '%\''; List<Account> results = Database.query(query);

Answer: A,B


NEW QUESTION # 70
How would a developer change the field type of a custom field on the Account object from string to an integer?

  • A. Make the change in the declarative UI, an then the change will automatically be reflected in the Apex code.
  • B. Remove all references in the code, make the change in the declarative UI, and restore the references with the new type.
  • C. Mate the change in the declarative UI, then update the field type to an integer field in the Apex code.
  • D. Make the changes in the developer console, and then the change will automatically be reflected in the Apex code.

Answer: B


NEW QUESTION # 71
A developer wants to handle the click event for a lightning:button component. The on click attribute for the component references a JavaScript function in which resource in the component bundle?

  • A. Helper.js
  • B. Handler.js
  • C. Controller.js
  • D. Renderer.js

Answer: C


NEW QUESTION # 72
A developer created this Apex trigger that calls MyClass,myStartmethod:

The developer creates a test method that calls MyClase,myStartmethod directly, resulting in 81% overall code coverage.
What happens wtier the developer tries to deploy the ... and two classes to production, assuming no other code exists?

  • A. The deployment passes because both classes and the trigger were included ki the deployment.
  • B. The deployment passes became the Apex code has the requited 75% code coverage.
  • C. The deployment tails because no assertions mett made in the lest method.
  • D. The deployment fails because the Apr- MgQM has no code coverage.

Answer: D


NEW QUESTION # 73
Which two operations can be performed using a formula field? Choose 2 answers

  • A. Triggering a Process Builder
  • B. Calculating a score on a Lead based on the information from another field (Missed)
  • C. Displaying an Image based on the Opportunity Amount (Missed)
  • D. Displaying the last four digits of an encrypted Social Security number

Answer: B,C


NEW QUESTION # 74
A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit. public class without sharing OpportunityService( public static List<OpportunityLineItem> getOpportunityProducts(Set<Id> opportunityIds){ List<OpportunitylineItem> oppLineItems = new List<OpportunityLineItem>(); for(Id thisOppId : opportunityIds){ oppLineItems.addAll([Select Id FROM OpportunityLineItems WHERE OpportunityId = :thisOppId)]; } return oppLineItems; } } The above method might be called during a trigger execution via a Lightning component. Which technique should be implemented to avoid reaching the governor limit?

  • A. Refector the code above to perform the SOQL query only if the Set of opportunityIds contains less 100 Ids.
  • B. Use the System.Limits.getlimitQueries() method to ensure the number of queries is less than 100.
  • C. Refactor the code above to perform only one SOQL query, filtering by the Set of opportunityIds.
  • D. Use the System.Limits.getQueries() method to ensure the number of queries is less than 100.

Answer: D


NEW QUESTION # 75
Which salesforce org has a complete duplicate copy of the production org including data and configuration?

  • A. Production
  • B. Partial Copy Sandbox
  • C. Developer Pro Sandbox
  • D. Full Sandbox

Answer: D


NEW QUESTION # 76
What are two testing consideration when deploying code from a sandbox to production? Choose 2 answers

  • A. 75% of test must execute without failure
  • B. 100% of test must execute without failure
  • C. Apex code requires 75% coverage
  • D. Apex code requires 100% coverage

Answer: B,C


NEW QUESTION # 77
A developer needs to have records with specific field values in order to test a new Apex class.
What should the developer do to ensure the data is available to the test?

  • A. Use Anonymous Apex to create the required data.
  • B. Use Test.Loaddata () and reference a static resource.
  • C. Use SOQL to query the org for the required data.
  • D. Use Test.Loaddata () and reference a CSV file

Answer: B


NEW QUESTION # 78
......

Online Questions - Outstanding Practice To your DEX-450 Exam: https://exam-labs.exam4tests.com/DEX-450-pdf-braindumps.html