• Raghav Thakur
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
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.