GetVirtualSite()
ts
GetVirtualSite(): string;Returns the ID of the virtual site in which context the session is running.
NOTE
The virtual site ID identifies the specific virtual site associated with the current session. This is useful in multi-tenant environments or when managing multiple sites within Syncplify Server!.
TIP
As of v8.0.6, event-handler scripts can read the same value via CtxVirtualSite(), or as the VirtualSite field of EventCtx(), with no need to check the session object first.
Example
ts
{
if (Session) {
var vSiteId = Session.GetVirtualSite();
Log('Virtual site is: ' + vSiteId);
} else {
Log('Session object is not available.');
}
}