function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kishore Vamsi 6Kishore 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;
Best Answer chosen by Kishore Vamsi 6
SwethaSwetha (Salesforce Developers) 
HI Kishore,
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

SwethaSwetha (Salesforce Developers) 
HI Kishore,
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
This was selected as the best answer
Kishore Vamsi 6Kishore Vamsi 6
Hi Swtha,
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.