- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2022 11:06 AM
Hello Team,
I'm trying to test flow but I don't know why I'm getting this error because of this it's not creating ScTask
Can anyone help me what is the issue.
Thanks,
JRY
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 07:48 AM
Hi,
Could you please run the script below and test it? Please let me know if you require any other assistance.
(function execute(inputs, outputs) {
var temp = inputs.ADAccount.split('\\');
if(temp.length != 2){
outputs.success = false;
outputs.errormessage = "Malformed lan id provided";
return;
}
var domain = temp[0];
if( domain.indexOf('.') >= 0 ){
domain = domain.split('.')[0];
}
var filter = "TechCode eq ('NT') and SubPlatCode eq (null) and PlatCode eq ('" + domain + "') and UID eq ('" + temp[1] + "')";
var iamAPIUtil = new IAM_API_Utils();
var response = iamAPIUtil.getAccountOData(filter);
outputs.success = true;
outputs.ownerxomguid = JSON.stringify(response.value[0].ownerxomguid).replace(/\D/g, '');
//gs.info(response.value[0]);
})(inputs, outputs);
If my answer helps anyway please mark it helpful.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2022 11:18 AM
Looks like JSON doesnt have that element, is the split logic correct, it says '\\' shouldnt it be '\' ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2022 11:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 12:02 AM
Hi
Can you help me on this one.
Thanks,
JRY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 12:24 AM
Hi,
Did you check what you got in response.value[0] object since you are getting value from that?
try to add gs.info() and share the details
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader