function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
GauravKumarGauravKumar 

How Can we use recordSetVar and extensions together

Hi ,
I have made an Standard Controller page. In this Standard controller page i have used like this
Code:
<apex:page standardController="Contact" tabStyle="Contact" recordSetVar="allContacts" extensions="ContactMassUpdate" showHeader="true"> 

 
but this give error
Error is :
Code:
Save error: Unknown constructor 'ContactMassUpdate.ContactMassUpdate(ApexPages.StandardSetController controller)'

 
I think This error comes due to use recordSetVar and extensions together is there is any alternate solution of this or i am wrong at an any step
How can I do this. Can you plz help me


Best Answer chosen by Admin (Salesforce Developers) 
GauravKumarGauravKumar
I have find solution of this Problem
First i have used this in our Controller Class
Code:
    public ContactMassUpdate(ApexPages.StandardController controller) {
  
    }

 
but this is not wrked good and give error
in palce of above code I have used this
Code:
public ContactMassUpdate(ApexPages.StandardSetController controller) {

}

 now this works good .Problem solved :)

All Answers

GauravKumarGauravKumar
I have find solution of this Problem
First i have used this in our Controller Class
Code:
    public ContactMassUpdate(ApexPages.StandardController controller) {
  
    }

 
but this is not wrked good and give error
in palce of above code I have used this
Code:
public ContactMassUpdate(ApexPages.StandardSetController controller) {

}

 now this works good .Problem solved :)

This was selected as the best answer
Rajat MahajanRajat Mahajan

Hi Gaurav,

 

You have given the same code below,

 

it does not seem to solve the problem,

 

could you please tell what you did to achieve it ?

 

Regards

Rajat

Sandeep001Sandeep001

these 2 constructors are different. first one is of a standard controller and second one is of a standardsetcontroller