What causes cross-scope errors in record producer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 04:04 AM - edited 01-09-2025 04:14 PM
I can't set a value for variables in the server script of Record producer.
The following script is included in the server script.
ErrorAccess to api 'put(sys_user.u_record_producer_variable)' from scope 'aaa' has been refused due to the api's cross-scope access policy.
aaa is the scope containing the record producer.
Do you know how to get rid of this error?
Thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 04:38 AM
you can't set producer variable from record producer script
why to have duplicate question in community?
you already raised one sometime back
Get the sys_id of the target record to set to the ... - ServiceNow Community
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 04:28 PM
Sorry. The title of the question was not good.
I wanted to ask about the cause of the error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 07:09 PM
you want to set record producer variable from record producer script?
if yes then not possible
You can use after insert BR and update the variable
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader