Retrieving the 'SiteKey' of an OpenPetra installation
Jump to navigation
Jump to search
Overview
Each installation of OpenPetra is installed for a particular 'Site' - that is an office of your organisation.
- An instance of the OpenPetra Server runs for one Site, and all OpenPetra Clients that access that OpenPetra Server are tied to that Site.
- The Site is set up in the System Manager Module when OpenPetra is installed for an office.
- The Site is identified in OpenPetra with a SiteKey, which is the PartnerKey of the Partner (of PartnerClass 'UNIT') that represents that office.
The SiteKey is needed by OpenPetra's software engineers in various circumstances and this page describes how to access it.
Accessing the Site Key on Client Side
Int64 SiteKey = Convert.ToInt64(TSystemDefaults.GetSystemDefault(SharedConstants.SYSDEFAULT_SITEKEY));
(TSystemDefaults is found in Namespace Ict.Petra.Client.App.Core
)
Accessing the Site Key on Server Side
Int64 SiteKey = DomainManager.GSiteKey;
(DomainManager is found in Namespace Ict.Petra.Server.App.Core
)