Updating a Barcode field with a string in a script

Hi all, I have tried for over 2 hours to get this to work, but can’t seem to.

I am trying to update a barcode primary key field. but the closest I got was this error message:

Type ‘string’ is not assignable to type ‘{ text: string; type?: string; }’.(2322)

oh I figured it out, you have to put it inside an extra object with { } and use the text: property. so that you can update barcode fields.

    await table.updateRecordAsync(record, {
        'Barcode field Name': { text: prefix + nextnumber, },

Glad to know that you were able to find a solution! If you would, please mark your latest comment as the solution to your question. This helps others who may be searching with similar questions. Thanks!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.