NElliott
12/11/2023, 3:35 PMlet id = record.submitFields({
type: record.Type.INVENTORY_ITEM,
id: itemID,
values:{
uncheckField: false
},
options: {
enableSourcing: false,
ignoreMandatoryFields: true
}
});
uncheckField holds the correct field name.
Using the fieldname directly unchecks the checkbox.
The .submitFields call returns the item internalid as expected, does not error but also does not uncheck the checkbox,
Is it not possible to substitute out the "values" field name key in this way?
(I've tried backticking and ${uncheckField} and that just breaks it)NElliott
12/11/2023, 3:51 PMlet id = record.submitFields({
type: record.Type.INVENTORY_ITEM,
id: itemID,
values:{
[uncheckField]: false
},
options: {
enableSourcing: false,
ignoreMandatoryFields: true
}
});
duh.
Leaving for anyone else it might be useful for.erictgrubaugh
12/11/2023, 4:09 PM[uncheckField]
that fixed the issue. This is a computed property name