
1 resposta
@Matthew LinfordIt is important when you want to filter the picklist values according a record type but it is impossible with the describe methods of the object and the fields.PicklistEntry Class : the record type is still missing so you get all the values of the picklist for all the record types used by the object.https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_Schema_PicklistEntry.htm⌗apex_class_Schema_PicklistEntryGetting Picklist values based on Record Type - Ideas - Salesforce https://success.salesforce.com/ideaView?id=08730000000gNpLAAUThere is this workaround (since v41.0): it is not the describe methods anymore but a call REST that can be done also with some apex code.https://developer.salesforce.com/docs/atlas.en-us.uiapi.meta/uiapi/ui_api_resources_picklist_values.htmYou can get the list of record types of an object but you cannot use them to filter the results of the describe of fields or get them from PicklistEntry.https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_Schema_RecordTypeInfo.htm⌗apex_class_Schema_RecordTypeInfo