Please debug my code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 10:52 PM
Hi
I wrote the attached code.
The logic is that we have a dropdown in a catalog item with the roles that needs to be added.
And we have check boxes identifying in which environment the role should be provided.
When i select the Role as Admin and select any environment, i am facing the below error.
Username: ajdoerksen, Group: [] ERROR MESSAGE: Cannot find an object with identity: '[]' under: 'DC=parkland,DC=domain'.', ERROR: Username: ajdoerksen, Group: [] ERROR MESSAGE: Cannot find an object with identity: '[]' under: 'DC=parkland,DC=domain'.
This code works for Production->User and Production->Super User. And UAT-> User and UAT->Super User.
Since the code works for other 2 and just not working for Admin role i am getting confused.
Are there any issues with my logic or code? Please help me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2025 11:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 01:46 AM
i dont understand what that means? We have an AD for Prod alone and this is lower instances.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 02:00 AM
did you try to replicate the issue in lower environment?
Are you sure the error you are showing is for that script only?
Because both are different things.
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
05-14-2025 02:12 AM
the issue is in lower environment only.
so basically when this script runs it sends the details to another group to add the user to a group automatically.
Does this script looks good?
are there any issue with logic or coding?
Thanks