I have Javascript which runs for ownerID_check while creating new vm catalog. But all off sudden it stopped working, and throwing an error message.
"Action 'ownerID_check' in module 'org.company.<orgname>' failed : TypeError: Cannot read property "name" from undefined (org.company.<orgname>/ownerID_check#9)"
There's no change in module, and also in script
JavaScript
var output =null;
if(Owner == null)
{
output="Missing LAN ID"
}
if(Owner !== null){
var users=Server.findAllForType("AD:User",Owner);
//output = users[0].name;
output=users[0].sAMAccountName
System.log("name"+output)
}
if (output == null)
{
output="LAN ID does not exist"
}
return output;