how to check roles for vendor contact in servicenow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 01:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 01:38 AM
It depends a bit where, but a Vendor contact should have snc_external.
Serverside : gs.hasRole('snc_external')
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 01:50 AM
Hello @Nandhini Sri
The following are the roles of it.
Vendor assessment reviewer
[sn_vdr_risk_asmt.vendor_assessment_reviewer]
Vendor contact
[snc_external]
Vendor risk assessor
[sn_vdr_risk_asmt.vendor_assessor]
Vendor risk manager
[sn_vdr_risk_asmt.vendor_risk_manager]
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2023 04:08 AM
Hi @Nandhini Sri ,
I trust you are doing great.
To check the roles for a vendor contact in ServiceNow, we can utilize the gs.hasRole() method on the server-side. Specifically, we will be checking if the user has the role of "snc_external," which indicates that the user is a Vendor contact.
Here's the code snippet for checking the role on the server-side:
// Server-side script to check if the current user has the role of "snc_external"
var isVendorContact = gs.hasRole('snc_external');
// You can use the boolean value 'isVendorContact' to make further decisions in your IT asset management process.
// For example, you can perform actions specific to a Vendor contact based on the 'isVendorContact' value.
Was this answer helpful?
Please consider marking it correct or helpful.
Your feedback helps us improve!
Thank you!
Regards,
Amit Gujrathi