Error appears when using additionalScope variable

When attempting to reference changeset from additionalScope inside a query, it seems to work, but shows an error. Is this expected?

const createCashflowReportItems = () => {
  return new Promise((resolve, reject) => {
    CRI_insert.trigger({
      additionalScope: {
        changeset: cashflowReportItems
      },
      onSuccess: (data) => {
        console.log('data ', data)
        resolve(data)
      },
      onFailure: (error) => {
        console.error('error ', error)
        reject(error)
      }
    })
  })
}

Yes, the changeSet is defined when the script is run - ASFAIK

1 Like