You need to sign in to do that
Don't have an account?
Kishore Vamsi 6
Get the pick list values from order item Object(order product) in LWC
I need to display status picklist values from order item object. below code giving null values. Please suggest how to get picklist values with out record type
import { getObjectInfo } from 'lightning/uiObjectInfoApi'; import OrderItem_OBJECT from '@salesforce/schema/OrderItem'; import { getPicklistValues } from 'lightning/uiObjectInfoApi'; import OrderItem_STATUS_FIELD from '@salesforce/schema/OrderItem.Status__c'; @wire (getObjectInfo, {objectApiName: OrderItem_OBJECT}) objectInfo; @wire(getPicklistValues, { recordTypeId: '$objectInfo.data.defaultRecordTypeId', fieldApiName: OrderItem_STATUS_FIELD } ) picklistValues;
Have you tried the approach mentioned in https://github.com/trailheadapps/lwc-recipes/tree/master/force-app/main/default/lwc/wireGetPicklistValues .
https://salesforce.stackexchange.com/questions/260959/lwc-get-pick-list-field-values
Thanks
All Answers
Have you tried the approach mentioned in https://github.com/trailheadapps/lwc-recipes/tree/master/force-app/main/default/lwc/wireGetPicklistValues .
https://salesforce.stackexchange.com/questions/260959/lwc-get-pick-list-field-values
Thanks
Thanks for the quick responce.
I have tried above approches but it is not working. Why because we don't have record types for order item object.