What properties are returned by the method GetCurrentLogicianUser() using the activeX object GE.CPO.EMR.90.Application.
xobject = new ActicveXObject("GE.CPO.EMR.90.Application");
user = xobject .GetCurrentLogicianUser();
I got the firstName and LastName ok, but I need the UserId.
alert("Got CurrentLogicianUser:" + user.FirstName + " " + user.LastName
In a previous post I was told to use
xobject .eval( "{USER.LOGINNAME}") but eval method is not defined on the xobject.
eval() is in a different object - "GE.CPO.EMR.80.Mel". Your code should work if you switched it to:
var xobject = null;
var melobject = null;
try
{
xobject = new ActiveXObject("GE.CPO.EMR.90.Application");
xobject.SetPasscode(window.external.Passcode);
}
catch (excp)
{
msg = "Unable to load ActiveX interface GE.CPO.EMR.90.Application.\nError message: " + excp.Message;
alert(msg);
}
try
{
melobject = new ActicveXObject("GE.CPO.EMR.80.Mel");
}
catch (excp)
{
msg = "Unable to load ActiveX interface GE.CPO.EMR.80.Mel.\nError message: " + excp.Message;
alert(msg);
}
if (melobject != null)
user = melobject.eval("{USER.LOGINNAME}");
EDIT: Added some try/catch logic
This intrigues me. In what context are you using ActiveX? Is it custom HTML forms?
In my case I am using ActiveX to make a connection to CPS for custom HTML forms.