+ Start a Discussion
maninder singh 50maninder singh 50 

schema:sobject:describe command of SFDX CLI does not show Picklist values.

I am using the Schema Sobject describe command of SFDX CLI (Salesforce CLI) to get picklist values for a custom object picklist field in my org. Link: https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_schema.htm#cli_reference_force_schema 

The issue here is that instead of showing the Picklist values the command outputs picklistValues: [Array] 
Below is an example of the output JSON i have for a field which is a picklist. Is this expected and how do we get the picklist values from SFDX CLI ? If I i use Force CLI it works fine for Sobject describe command.
{ aggregatable: true,
       aiPredictionField: false,
       autoNumber: false,
       byteLength: 765,
       calculated: false,
       calculatedFormula: null,
       cascadeDelete: false,
       caseSensitive: false,
       compoundFieldName: null,
       controllerName: 'REX_PS_Category__c',
       createable: true,
       custom: true,
       defaultValue: null,
       defaultValueFormula: null,
       defaultedOnCreate: false,
       dependentPicklist: true,
       deprecatedAndHidden: false,
       digits: 0,
       displayLocationInDecimal: false,
       encrypted: false,
       externalId: false,
       extraTypeInfo: null,
       filterable: true,
       filteredLookupInfo: null,
       formulaTreatNullNumberAsZero: false,
       groupable: true,
       highScaleNumber: false,
       htmlFormatted: false,
       idLookup: false,
       inlineHelpText: null,
       label: 'Location Agreed',
       length: 255,
       mask: null,
       maskType: null,
       name: 'REX_Location_Agreed__c',
       nameField: false,
       namePointing: false,
       nillable: true,
       permissionable: true,
       picklistValues: [Array],
       polymorphicForeignKey: false,
       precision: 0,
       queryByDistance: false,
       referenceTargetField: null,
       referenceTo: [],
       relationshipName: null,
       relationshipOrder: null,
       restrictedDelete: false,
       restrictedPicklist: true,
       scale: 0,
       searchPrefilterable: false,
       soapType: 'xsd:string',
       sortable: true,
       type: 'picklist',
       unique: false,
       updateable: true,
       writeRequiresMasterRead: false },

Best Answer chosen by maninder singh 50
maninder singh 50maninder singh 50
I figured it out. Using --json actually prints the the picklist values as well.