I have a LWC where I am populating the picklist using wire service.
@wire(getPicklistValues , {recordTypeId: '$accountItem.data.defaultRecordTypeId',fieldApiName: ACCT_ITEM_STATUS })
acctStatus;
Wire populates picklist
<template if:true={acctStatus.data}>
<lightning-layout-item size="3" padding="around-small">
<lightning-combobox value={value} placeholder="Complete" onchange = {handleAcctChange} options={acctStatus.data.values} label="Account Item Status" ></lightning-combobox>
</lightning-layout-item>
</template>
2 Questions
1.How can I pass the the placeholder value to a connectedcallback?
2.How do I pass the picklist onchange value to the connectedcallback?
import getAcctLayout from '@salesforce/apex/AccountController.getAccountItems';
async connectedCallback() {
const acctLayout = await getAcctLayout({acctId: this.recordId, acctStatus: picklist value})
complete
is static ? why again you need to get from component 2. why you need to pass picklist value connectedcallback event? for getAcctLayout function? what are you doing in getAcctLayout function? is any Apex server call?