How are documents stored in SedonaOffice?

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. 

Text 
Description automatically generated  

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_4 
FROM            SedonaDocuments.dbo.AR_Customer_Documents DOC inner join SedonaMaster.dbo.Company AS comp ON doc.SedonaCompany_Id = comp.Company_Id  
Left outer join MasterSetupStandard.dbo.AR_Customer SO on DOC.SedonaCustomer_Id = so.Customer_Id 
Left outer join MasterSetupStandard.dbo.AR_Customer_Site CS on DOC.SedonaSite_Id = CS.Customer_Site_Id 
Left outer join MasterSetupStandard.dbo.AR_Customer_System CSY on DOC.SedonaSystem_Id = CSY.Customer_System_Id 
Left outer join SedonaDocuments.dbo.SY_Document_Type DT on DOC.Document_Id = DT.Document_Type_Id 
Left outer join MasterSetupStandard.dbo.OE_Job JOB on DOC.Job_Id = JOB.Job_Id 
Where doc.SedonaCustomer_Id = 9 
Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted for approval.