- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2022 02:10 AM
Friends,
I use gs.eventQueue to call my event trigger in UI action which works fine.
When I use the same gs.eventQueue in Widget to call my event trigger I get the below error message,
Kindly help on how to define an event in Widget.
"Access to event '(event name)' from scope 'Service Portal - Standard Ticket' has been refused. The event is not defined."
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2022 02:16 AM
Thanks for your reply, Resolution is like Pradeep Sharma advised "Can you create an event in the same scope and try once. Leave the table field to blank."
I have created the event in the Same scope of my widget and left the table field to blank,
to my surprise it worked with no issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2022 02:14 AM
This may be Scope issue. IF your Widget and Event Registry are on different Scopes, you need to provide Cross Scope Privilege access using 'sys_scope_privilege' table.
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2022 04:46 AM
Thanks for your reply, I tried providing privilege,
My Widget scope is "Service Portal - Standard Ticket" and the Event which I placed is in "Global",
Then Event will be triggered from "Incident Standard Ticket Actions" widget - which I think it is Source scope,
but when I create new scope privilege I am not able to change from "Global" to "Service Portal - Standard Ticket" and if I tried to have Source as "Global" and Target as "Service Portal - Standard Ticket" I get this error in the attached image issue, kindly help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2022 05:07 AM
Create Cross Scope Privilege in "Service Portal - Standard Ticket" (Change your scope to "Service Portal - Standard Ticket")
Target Scope - Global
No try with Different Target Type and provide Read/write access and see if this resolve your issue.
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2022 05:13 AM
New scope creation worked as you said,
but I get the same error message again,
"Access to event 'Incident Escalation Event' from scope 'Service Portal - Standard Ticket' has been refused. The event is not defined."
FYI, My widget is in scope - "Service Portal - Standard Ticket" and my Event - "Incident Escalation Event" is in Global Scope,
below is the code I have it in my widget -
gs.eventQueue('Incident Escalation Event', incidentGr, 'incidentGr.assignment_group.email', 'incidentGr.assignment_group.manager.email');