- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 12:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 07:02 AM
Thanks i got till here. This worked but i also need to create an credential alias for this to use it from flow rest action. How can i create a credential alias?
Thanks
Ratna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 09:02 PM
Hello @ratnaj
Create a new record in sys_alias table. This is the table that store credential alias.
This is how the form looks like:
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 10:21 PM
How do i write a script and automate this using a script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2024 11:27 PM
Hello @ratnaj
Here is the script to create credential alias
var aliasGR = new GlideRecord('sys_alias');
// Initialize a new record
aliasGR.initialize();
// Set field values
aliasGR.name = 'my_custom_alias'; // Set the alias name
// Insert the record into the table
aliasGR.setValue('type', 'connection');
var aliasSysId = aliasGR.insert();
if (aliasSysId) {
gs.info('Alias record created successfully with Sys ID: ' + aliasSysId);
} else {
gs.error('Failed to create alias record');
}
Result:
Hope this helps!
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps others find the solution more easily and supports the community!"
Thank You
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-19-2024 04:35 PM