0
I am trying to pull in picklist values of a field based on record type. The below works -
@wire(getPicklistValuesByRecordType, { objectApiName: 'Case', recordTypeId: '0123h000000kv04AAA' })
typePicklistValues({ error, data }) {
if (data) {
console.log(data.picklistFieldValues.Type.values)
this.options = data.picklistFieldValues.Type.values;
}
}
If I replace the ObjectAPIName & recordtype with a variable, it doesn't work -
@wire(getPicklistValuesByRecordType, { objectApiName: '$this.objectName', recordTypeId: '$this.recordTypeId' })
typePicklistValues({ error, data }) {
if (data) {
console.log(data.picklistFieldValues.Type.values)
this.options = data.picklistFieldValues.Type.values;
}
}
All those variables have the actual values, which I checked already, is there anything that I am doing wrong here?