I'm referring to the document to make use of out of box import { updateRecord, } from 'lightning/uiRecordApi'; It is straight forward to understand how to pass field values from the given example in the document for updateRecord. updateRecord
const fields = {};
fields[ID_FIELD.fieldApiName] = this.contactId;
fields[FIRSTNAME_FIELD.fieldApiName] = this.template.querySelector("[data-field='FirstName']").value;
fields[LASTNAME_FIELD.fieldApiName] = this.template.querySelector("[data-field='LastName']").value;
const recordInput = { fields };
updateRecord(recordInput)
.then(() => {
Example is for single values. My question is if one of the field is a multi select picklist, say states, how do I pass that value ( even hard coded ) to the field name in LWC js. I tried many combinations
fname__c:"NY;CT;NJ"
fname__c:["NY","CT","NJ"]
nothing seems to work