Skip to content

Commit

Permalink
Fixed #272 by explicitly delcaring the list as List<Schema.PicklistEn…
Browse files Browse the repository at this point in the history
…try> instead of just List<PicklistEntry>

I typically include the Schema namespace anyway, not sure why I didn't previously do so in this particular example
  • Loading branch information
jongpie committed Jan 20, 2022
1 parent 00622c1 commit e6403b0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public without sharing class LogHandler extends LoggerSObjectHandler {
}

private void setPriority() {
List<PicklistEntry> picklistEntries = Schema.Log__c.Priority__c.getDescribe().getPicklistValues();
List<Schema.PicklistEntry> picklistEntries = Schema.Log__c.Priority__c.getDescribe().getPicklistValues();

// 3 assumptions
// 1. Assume that that there will always be 3+ picklist values for the Priority__c field (out of the box, the values are: High, Medium, Low)
Expand Down

0 comments on commit e6403b0

Please sign in to comment.