Description of Issue:
How are documents stored in SedonaOffice?
Resolution:
When a document is saved in a SedonaOffice Company, the file is saved in the SedonaDocuments Database.
This is a shared database across all SedonaOffice companies, so all documents from all your companies are within this database.
There are multiple tables within the SedonaDocuments database. Basically, one table for each of the modules that use documents.
This is an example of the records in one of these tables.
There are multiple fields that are used to link the documents to the correct company and record.
The documents are linked to the Company by the SedonaCompany_ID.
This table is for AR so the document can be linked to a Customer, Site, Or System.
Other tables will have links to other table records like this.
If you are creating a query to try and pull information on these documents, you will need to know what company the documents are for.
The company information is in the SedonaMaster database.
If you wanted to use this data in a report, you will have to link multiple tables from multiple databases.
Below is an example of how to get information for the AR_Customer_Documents for a specific SedonaOffice Company.
SELECT doc.Document_Id, comp.CompanyName, doc.SedonaCustomer_Id, so.Customer_Name, doc.SedonaSite_Id, cs.Site_Number, doc.SedonaSystem_Id,CSY.Alarm_Account, doc.Security_Level, doc.FileName, doc.FileSize, DT.Document_Type_Description, doc.UploadDate, doc.UserDescription, doc.UserCode, doc.Reference_1,doc.Reference_2, doc.Reference_3, JOB.Job_Code, doc.Reference_4FROM SedonaDocuments.dbo.AR_Customer_Documents DOC inner join SedonaMaster.dbo.Company AS comp ON doc.SedonaCompany_Id = comp.Company_IdLeft outer join MasterSetupStandard.dbo.AR_Customer SO on DOC.SedonaCustomer_Id = so.Customer_IdLeft outer join MasterSetupStandard.dbo.AR_Customer_Site CS on DOC.SedonaSite_Id = CS.Customer_Site_IdLeft outer join MasterSetupStandard.dbo.AR_Customer_System CSY on DOC.SedonaSystem_Id = CSY.Customer_System_IdLeft outer join SedonaDocuments.dbo.SY_Document_Type DT on DOC.Document_Id = DT.Document_Type_IdLeft outer join MasterSetupStandard.dbo.OE_Job JOB on DOC.Job_Id = JOB.Job_IdWhere doc.SedonaCustomer_Id = 9