[IMPLEMENTED] Scripting: Referencing Content Status

Good day, I have created a custom workflow using the Workflows function introduced in the latest release. My simple workflow is as such:

Draft -> Request Review -> Published

I want to use a script to prevent the user from deleting a post while it is in ‘Request Review’ state. How to I reference the ‘Request Review’ status of the post from my script?

id: “4ac0baca-4a06-43a5-8ca6-667e164e1ad9”, createdBy: “subject:5d01ed5248f2f85f80861c7c”,…}
created: “2019-07-15T07:12:55Z”
createdBy: “subject:5d01ed5248f2f85f80861c7c”
data: {title: {iv: “asdasd”}, body: {iv: “asdsadsadas”}}
body: {iv: “asdsadsadas”}
iv: “asdsadsadas”
title: {iv: “asdasd”}
iv: “asdasd”
dataDraft: {title: {iv: “asdasd”}, body: {iv: “asdsadsadas”}}
body: {iv: “asdsadsadas”}
iv: “asdsadsadas”
title: {iv: “asdasd”}
id: “4ac0baca-4a06-43a5-8ca6-667e164e1ad9”
isPending: false
lastModified: “2019-07-18T10:25:24Z”
lastModifiedBy: “subject:5d01ed5248f2f85f80861c7c”
status: “Request Review”
statusColor: “#0087ff
version: 1

Also, using console.log in the script doesn’t work. Is there another way for me to output to the console? Will definitely help with debugging.

Thanks!

Hi, it is actually not possible, because the status is not exposed to the scripting engine. I have changed the support request to a feature request and can probably implement it this week or beginning of next week.

Hi Sebastian, that’s good to know. Thank you.