JSON plugin, Error: Cannot read data slot in header when doing CRUD

I’m using a data slot to carry authorization token in the header. It works when doing search and list. However when adding records to the data sheet , and the addItem function is called to execute the POST towards the web service, it crashes on this line

let headers = {‘Authorization’: this.dataSlots[‘ds_token’]};

The line in error is in the data sheet js file.

The error received is that the data slot property for the token is undefined, “TypeError: Cannot read property ‘ds_token’ of undefined”.

Bulk carry properties from container has been set, the data slot for the token has a value…

So, what am I missing out here ?

There’s no access from within data sheet js files to global data slots table by default. We’ll make an update to the JSON plugin that will allow it.