Thanks for the response
This code looks like it has some issues , for example
chnageEvent.collection is not a reference to the collection
itself and i don’t believe has an updateOne function.
I can just grab a reference to the collection from scratch I guess. Surprising the changeEvent doesn’t have one?
Additionally there are const declared values which you are
changing. So there are fundamental js issues here, does this
code run without errors??
In javascript I should be able to change the properties of a const object – and I expect that to be the correct use here? Something seems to definitely be wrong with the fullDocument though.
Please share the trigger web url so I can have a look.
I don’t know the web url? This is a trigger, not a web hook.
Look at my blog series here it contains some similar trigger manipulation
maybe it will provide you with the way to write this one.
It has an async and await trigger syntax as it is much cleaner and advised.
Thanks, ok… yeah await and async work as expected. The trigger web editor just doesn’t like it.
With the help if your examples, I can add a brand new entry to another collection. So it’s definitely the fullDocument that’s failing.
WHERE CAN I get some reference and help how to work with changeEvent and fullDocument?