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
Raghav ThakurRaghav Thakur 

How to get the OpportunityLineItem picklist field values in LWC component?

HI there,
I have a situation, on which I need to show the OpportunityLineItem picklist field (i.e. AcceptReject__c Field) on lWC component. And then Save that value with the rest data and display the saved data on UI.
I tried 
import { LightningElement, wire } from 'lwc';
import { getPicklistValues } from 'lightning/uiObjectInfoApi';
import ACCREJ from '@salesforce/schema/OpportunityLineItem.AcceptReject__c';

export default class LwcGetpicklistDemo extends LightningElement {
    @wire(getPicklistValues, { recordTypeId: '$objectInfo.data.defaultRecordTypeId', fieldApiName: ACCREJ })
    AcceptReject;
}


<lightning-combobox
            name="acceptReject"
            value={item.acceptReject}
            placeholder="Select"
            options={AcceptReject.data.values}
            onchange={handleChange} >
</lightning-combobox>

Also i tried the above code but i am not able to get anything.
Please anyone help me out in this, how can i get and after selecting the data(picklist value) how can i set that value so that whenever i make the data available on UI from backend it should show on the combobox with correct value.
Thanks.
sandeep unnikrishnansandeep unnikrishnan
bind the value to a variable and use in your controller  like this <lightning-combobox
name="progress"
label="Status"
value={value}
placeholder="Select Progress"
options={options}
onchange={handleChange} ></lightning-combobox>