Add Registration Code to Query Builder in SedonaOffice

Issue:

The registration code was added to SedonaOffice before it was added to the customer query builder, so older versions of SedonaOffice do not have it in the query builder, so users cannot get a list of these if needed on a report.

Resolution:

The SQL script in this document can be run against the database to add the Registration_Code to the available fields used in the Query Builder.

Once the script is ran against each of the SedonaOffice databases, it can be used when creating a query under the Client Management – Customer Querry Builder application.

Below is the script that will need to be ran against any of the SedonaOffice company databases.

--- Create backup of table before making changes. ---

Select * into SD_Query_Builder_Def_backup from SD_Query_Builder_Def

--- Insert record for the customer registration code ---

INSERT INTO [dbo].[SD_Query_Builder_Def]

           ([Query_Type]

           ,[Category]

           ,[Friendly_Name]

           ,[Data_Field_Name]

           ,[DataType]

           ,[Cat_Num]

           ,[Sub_Cat]

           ,[Sort_Order]

           ,[Table_Name]

           ,[Table_Join]

           ,[Dependent_On]

           ,[Raw_DataField]

           ,[Raw_Table_Name])

     VALUES

           ('C','Customer','Registration_Code','AR_Customer.Registration_Code','varchar',10,'',13600,'AR_Customer'

           ,'AR_Customer','AR_Customer','AR_Customer.Registration_Code','AR_Customer')