Hi community!
I’m setting up a script so I can mark order line items as “Delivered” by ticking a checkbox on the order tab. I’ve find a really useful post where a boiler template of code was provided (can’t seem to find it back).
// Setup
const config = input.config()
const ordersQuery = await base.getTable("ORDERS").selectRecordsAsync()
const orderLinesTable = base.getTable("ORDER LINE ITEMS")
const orderLinesRecords = await orderLinesTable.selectRecordsAsync()
const checkedOrder = ordersQuery.getRecord(config.recordID)
// Collect linked tasks and find those that aren't checked
let orderLines = checkedOrder.getCellValue("ORDER LINE ITEMS")
let uncheckedTasks = orderLines.filter(linkObj => !orderLinesRecords.getRecord(linkObj.id).getCellValue("Mark As Delivered"))
// Build array of updates
let updates = uncheckedTasks.map(linkObj => {
return {
id: linkObj.id,
fields: {
"production_status": DELIVERED (PARTYSPACE) ✅
}
}
})
// Update task records
while (updates.length > 0) {
await orderLinesTable.updateRecordsAsync(updates.slice(0, 50))
updates = updates.slice(50)
}
I don’t get an error, however as a result i get script input = recordId reci2EvwplbE51f4F.
No changes where made to the desired output field.
Any tips?
Thank you



