Free DEV-450 Exam Braindumps (page: 52)

Page 52 of 95

Given the code below, which three statements can be used to create the controller variable? Public class accountlistcontroller{ public list<account>getaccounts(){ return controller.getrecords(); } } Choose 3 answers

  1. Apexpages.standardsetcontroller controller=new
    apexpages.standardsetcontroller(database.getquerylocator('select id from account'));
  2. Apexpages.standardcontroller controller= new apexpages.standardcontroller([select id from account]);
  3. Apexpages.standardcontroller controller= new
    apexpages.standardcontroller(database.getquerylocator('select id from account'));
  4. Apexpages.standardsetcontroller controller = new apexpages.standardsetcontroller (database.query('select id from account'));
  5. Apexpages.standardsetcontroller controller = new apexpages.standardsetcontroller (database.getquerylocator([select id from account]));

Answer(s): B,D,E



A developer runs the following anonymous code block:List<Account> acc = [SELECT Id FROM Account LIMIT 10];Delete acc;Database.emptyRecycleBin(acc);system.debug(Limits.getDMLStatements()+ `, `
+Limits.getLimitDMLStatements());What is the result?

  1. 11, 150
  2. 150, 2
  3. 150, 11
  4. 2, 150

Answer(s): D



On a Visualforce page with a custom controller, how should a developer retrieve a record by using an ID that is passed on the URL?

  1. Use the constructor method for the controller.
  2. Use the $Action.View method in the Visualforce page.
  3. Create a new PageReference object with the Id.
  4. Use the tag in the Visualforce page.

Answer(s): A



Opportunity opp=[SELECT Id,StageName FROM Opportunity LIMIT 1]; Given the code above,how can a developer get the label for the StageName field?

  1. Call Opportunity.StageName.Label
  2. Call Opportunity.StageName.getDescribe().getLabel()
  3. Call Opp.StageName.getDescri
  4. Call Opp.StageName.Label

Answer(s): B



Page 52 of 95



Post your Comments and Discuss Salesforce DEV-450 exam with other Community members:

Bhuppi commented on December 18, 2024
my exam is on 22nd of DEC.
Anonymous
upvote

Sangeeta commented on December 06, 2024
Want to attempt pd1 exam
UNITED STATES
upvote

xyz commented on August 16, 2024
will post once complete the exam
Anonymous
upvote

abcdef commented on August 10, 2024
Will post once exam done
Anonymous
upvote

UK commented on August 06, 2024
will post once complete the exam
Anonymous
upvote

AP commented on June 14, 2024
will post once complete the exam
ROMANIA
upvote

Lp commented on June 09, 2024
will post once complete the exam
UNITED STATES
upvote

jsb commented on May 17, 2024
will post once complete the exam
Anonymous
upvote

chitti robbo commented on April 22, 2024
will post once complete the exam
Anonymous
upvote

Jamin commented on February 13, 2024
While I did pass my exam using these questions but I noticed a couple of answers were not correct. The questions however are word by word.
INDIA
upvote

hi commented on October 05, 2023
will post exam has finished
UNITED STATES
upvote

NRI commented on August 27, 2023
will post once the exam is finished
UNITED STATES
upvote

Dev commented on January 09, 2024
Will post once I complete the Exam
Anonymous
upvote

hi commented on October 05, 2023
Will post exam has finished
UNITED STATES
upvote

NRI commented on August 27, 2023
Will post once the exam is finished
UNITED STATES
upvote