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
Kelvin Tam 11Kelvin Tam 11 

Update dynamic fields by using Lightning web component

Hi All,

I would like to make a lightning web component to update dynamic field.

The design is using custom matedata to set field api name and the component get this api name and update record's target field. However I find the recordUpdate() function does support dynamic field, so do you know any other method to do so?

let record ={
fields:{
Id: this.objID,
test__c:this.objFieldValue  //I would like to replace the test__c to be a varaible.
},
};
updateRecord(record)