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
Alex MakkAlex Makk 

Variable does not exist: PicklistDescriber

Hi all! I have following piece of a code that gives me error when I try to deploy:

Variable does not exist: PicklistDescriber

Any ideas?
 
public OpportunityWrapper(String accId, String accName, String oppTitalName, String recordTypeId){
            this.accId = accId;
            this.accName = accName;
            this.oppTitalName = oppTitalName;
            this.recordTypeId = recordTypeId;
            this.lstCurrentUsg = new List<SelectOption>();
            this.lstCurrentPPEType = new List<SelectOption>();
            this.lstCurrentDis = new List<SelectOption>();
            this.lstCompetition = new List<SelectOption>();
            this.lstDisContainer = new List<SelectOption>();

            
            this.oppObj = new Opportunity();
            this.oppObj.recordTypeId = recordTypeId;
            
            for(String optName : PicklistDescriber.describe('Opportunity', oppTitalName, 'Current_Usage__c')) {
                this.lstCurrentUsg.add(new SelectOption(optName, optName));
            }
            for(String optName : PicklistDescriber.describe('Opportunity', oppTitalName, 'Current_PPE_Type__c')) {
                this.lstCurrentPPEType.add(new SelectOption(optName, optName));
            }
            for(String optName : PicklistDescriber.describe('Opportunity', oppTitalName, 'Disposal_Method__c')) {
                this.lstCurrentDis.add(new SelectOption(optName, optName));
            }
            for(String optName : PicklistDescriber.describe('Opportunity', oppTitalName, 'Competition__c')) {
                this.lstCompetition.add(new SelectOption(optName, optName));
            }
            for(String optName : PicklistDescriber.describe('Opportunity', oppTitalName, 'Disposal_Container__c')) {
                this.lstDisContainer.add(new SelectOption(optName, optName));
            }
        }
 
Best Answer chosen by Alex Makk
Alain CabonAlain Cabon
Hi,

PicklistDescriber is a class here with a static method describe.

Can you add this class to your changeset?  It should be new or deleted in the targeted org perhaps.
 

All Answers

Alain CabonAlain Cabon
Hi,

PicklistDescriber is a class here with a static method describe.

Can you add this class to your changeset?  It should be new or deleted in the targeted org perhaps.
 
This was selected as the best answer
Alex MakkAlex Makk
And you are correct! Thanks Alain!