- 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-15-2022 01:06 AM
Hi,
I'm getting empty.
Thanks,
JRY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 01:39 AM
that's the issue then
you are trying to access object from empty
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 04:17 AM
Hi
I believe it is not converting into integer because of special characters such as ('.', '/'). Could you please assist me in figuring out how to achieve this?
Thanks,
JRY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 01:44 AM
that's the issue then
you are trying to access object from empty
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2022 02:04 AM
It's working for a different set of values. It only fails when the domain is not empty.
Thanks,
JRY
