I have another question.
I have a submitFields that I use many places in the script, the only difference is the field I'm updated. As you can see below, I want to use different field instead of entity. I'm thinking to define a variable and try to use it instead of entity.
Something like
v_field = 'entity'
other time
v_field='color'
record.submitFields({
type: vfile,
id: vinternalid,
values: {entity: v_customer},
values: {v_field: v_customer}, <- that's what I'm looking for
options: {
enableSourcing: false,
ignoreMandatoryFields : true