Which code block returns the ListView of an Account object using the - ProProfs Discuss
Topics
Products
Follow Us:

Which code block returns the ListView of an Account object using the following debug statement? system.debug (controller.getListViewOptions); 



A. ApexPages.StandardSetController controller = new ApexPages.StandardSetController( Database.getQueryLocator( SELECT ID FROM Account LIMIT 1 ));
B. ApexPages.StandardController controller = new ApexPages.StandardController( [SELECT ID FROM Account LIMIT );
C. ApexPages.StandardController controller = new ApexPages.StandardController( Database.getQueryLocator( SELECT ID FROM Account LIMIT 1 ));
D. ApexPages.StandardController controller = new ApexPages.StandardController( [SELECT ID FROM Account LIMIT );

This question is part of Platform 1d
Asked by Kevindotcar, Last updated: Aug 06, 2020

+ Answer
Request

2 Answers

bit.prem

Bit.prem

Answered Aug 31, 2017

Database.GetQueryLocator( SELECT Id FROM Account LIMIT 1 ) will not return list of Account andStandardSetController require List

answer should be like

ApexPages.StandardSetController controller = new ApexPages.StandardSetController( [SELECT Id FROM Account LIMIT 1 ]);

 

John Smith

John Smith

Answered Feb 08, 2017

ApexPages.StandardSetController controller = new ApexPages.StandardSetController( Database.getQueryLocator( SELECT Id FROM Account LIMIT 1 ));
 

Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer
Search for Google images
Select a recommended image
Upload from your computer

Email Sent
We have sent an email to your address "" with instructions to reset your password.