Ent Class
- Last UpdatedNov 06, 2025
- 1 minute read
The Ent class handles all the MES functionality for an entity. An Ent object is created for each entity that the user logs into. The Ent object will create service objects for each capability of the entity (e.g., a JobExec object is created if the entity has the "can run jobs" capability).
A reference to an entity can be obtained from the clientSession.curUser.curEnt attribute or from the list of entities that are logged on by the current user. The following example shows how to retrieve a specific entity from the entity list.
dimentityasaaFactMES.aaEnt;
dimtempEntasaaFactMES.aaEnt;
dimEntListASSystem.Collections.IDictionary;
' get the client session
result= aaFactMES.aaClientSession.GetInstance();
clientSession= result.Value;
if(clientSession<> nullandclientSession.curUser<> null) then
' find the entity the user is logged into
EntList= ClientSession.curUser.EntList; foreachidinEntList.KeystempEnt= clientSession.curUser.EntList[id];
if(tempEnt.entName== me.entityName) then
entity= tempEnt;
exitfor;
endif;
next;
System.Object
FactMES.Client.Common.Ent
