Function nowDateTime is not allowed in scope x_xxxxx_customer. Use GlideDateTime instead: new GlideDateTime().getDisplayValue()

levino
Giga Guru

Hi there

this only happens on one particular catalog item, i do no thave any script running for that particular catalogi item.

all  my catalog item use the same workflow but only on this  one i keep getting the message below

Function nowDateTime is not allowed in scope x_xxxxx_customer. Use GlideDateTime instead: new GlideDateTime().getDisplayValue()

Thanks

Levino

1 ACCEPTED SOLUTION

Allen Andreas
Tera Patron

Hi,

Is the workflow for that item running on a scoped app?

If so, it's telling you "nowDateTime" is not allowed in scoped app and to use GlideDateTime...instead.

Please mark reply as Helpful/Correct, if applicable. Thanks!

View solution in original post

2 REPLIES 2

Allen Andreas
Tera Patron

Hi,

Is the workflow for that item running on a scoped app?

If so, it's telling you "nowDateTime" is not allowed in scoped app and to use GlideDateTime...instead.

Please mark reply as Helpful/Correct, if applicable. Thanks!

Mark Roethof
Tera Patron

Hi there,

It's indeed like Allen already mentioned. The error tells you exactly what your issue is. If it's in scope, indeed your using a not allowed function in scope.

Here's a nice Docs page with loads of scoped examples:
https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_re...

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list