What you want is add company name in active session and in CU1's CompanyOpen function to update that field?
This should work. Let me try this . Thanks for the idea!
EDIT:
Thanks this works. Basically added a new field 'Session company name' to active sessions table and wrote the below code in a OnAfterCompanyOpen subscriber function of CU1.
[EventSubscriber] OnAfterCompanyOpen()
WITH ActiveSessions DO BEGIN
SETRANGE("Session ID",SESSIONID);
IF FINDFIRST THEN
"Session Company Name":=COMPANYNAME;
ActiveSessions.MODIFY;
END
Answers
What you want is add company name in active session and in CU1's CompanyOpen function to update that field?
This should work. Let me try this . Thanks for the idea!
EDIT:
Thanks this works. Basically added a new field 'Session company name' to active sessions table and wrote the below code in a OnAfterCompanyOpen subscriber function of CU1.
[EventSubscriber] OnAfterCompanyOpen()
WITH ActiveSessions DO BEGIN
SETRANGE("Session ID",SESSIONID);
IF FINDFIRST THEN
"Session Company Name":=COMPANYNAME;
ActiveSessions.MODIFY;
END