- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 12:32 PM
Hi All, i am trying to find a solution for validate User ID active or not in Transform.
can someone help me if we can validate that using run script on the transform.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 12:39 PM
You can create a onBefore Transform script and create a query to check if the called id is valid. If not, if you want to ignore, you can set ignore=true. Below is an example.
var user = new GlideRecord('sys_user');
user.addQuery('user_name',source.u_caller_id);
user.query();
if (user.next() && user.active!='true')
{
ignore=true
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 02:16 PM
I dont think, unless you are using scripted rest api.
In the scripted rest api, you can validate the data even before transforming it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 02:38 PM
can you help me write Scripted rest api?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 02:45 PM
Below link is a good starting point
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 12:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 01:06 PM
Thanks for your response, but i am trying to look for user active status when i use rest api in order to avoid create INC for inactive user and i want to get error info mesg on that response.