Hi all, I run the below script as behavior script and it works. When trying to run the code from automation rules I get some errors:
Hi @Guy Marelly ,
I'm afraid that's normal. A behaviour and a Job/Listener (which I assume you use as an automation) work differently.
A behaviour is based on the UI/Screen and has specific methods available such as getFieldById()
These methods don't work in a standalone script so you'll have to rewrite it to actually work in the job/listener context.
I suggest checking out the adaptavist documentation first https://docs.adaptavist.com/sr4js/latest/features/jobs
TLDR; behaviours use different methods than jobs/listener so you'll have to use the right ones.
Thanks Dirk for your quick reply and explanation!
I'll check the documentation you've recommended.
It looks like you're new here. Sign in or register to get started.