Difference between revisions of "CID Name Change Guide"

From Adjutant Wiki

Line 5: Line 5:
  
 
Changing the CID name should be a very rare occurrence, and should only be attempted by ABIS personnel after consulting with a supervisor and senior development.  Every customer's Adjutant installation is unique and there can be unforeseen issues when running the 'Change CID Name' tool. This guide is designed to cover the process, but may not cover every potential situation.  
 
Changing the CID name should be a very rare occurrence, and should only be attempted by ABIS personnel after consulting with a supervisor and senior development.  Every customer's Adjutant installation is unique and there can be unforeseen issues when running the 'Change CID Name' tool. This guide is designed to cover the process, but may not cover every potential situation.  
 
 
== Adjutant Folder Structure ==
 
  
 
The 'Change CID Name' utility is designed to update all database instances of the previous CID name to the desired new CID name. The utility does not change the Adjutant folder structure for the Adjutant installation. If the CID change requires that the folder structure be updated, the development team will have to be involved to coordinate all of the required database moves. Changing the Adjutant folder structure may require system down-time, and may be a billable service. Consult your supervisor for guidance.
 
The 'Change CID Name' utility is designed to update all database instances of the previous CID name to the desired new CID name. The utility does not change the Adjutant folder structure for the Adjutant installation. If the CID change requires that the folder structure be updated, the development team will have to be involved to coordinate all of the required database moves. Changing the Adjutant folder structure may require system down-time, and may be a billable service. Consult your supervisor for guidance.
Line 15: Line 12:
 
== Preparation for CID Name Change ==
 
== Preparation for CID Name Change ==
  
=== Review SQL Data ====
+
=== Review SQL Data ===
  
 
# In SQL, clear any IKEY data in the '''SOCANSWER''' table.  The '''SOCANSWER''' table no longer uses the IKEY to link to the other SOC-related tables.  If the 'Change CID Name' utility finds an IKEY in '''SOCANSWER''' linked to an inactive item, it will just delete the '''SOCANSWER''' record, which may cause issues.  
 
# In SQL, clear any IKEY data in the '''SOCANSWER''' table.  The '''SOCANSWER''' table no longer uses the IKEY to link to the other SOC-related tables.  If the 'Change CID Name' utility finds an IKEY in '''SOCANSWER''' linked to an inactive item, it will just delete the '''SOCANSWER''' record, which may cause issues.  
Line 33: Line 30:
  
 
== Changing the CID Name ==
 
== Changing the CID Name ==
 +
 +
Switch to the target CID and access the Delete/Change CID screen
 +
 +
Select the 'Change CID Name' radio button
 +
 +
Enter the current CID name in the Old CID field
 +
Enter the desired new CID name in the New CID field
 +
 +
After triple-checking all entries, click the Process button
  
  

Revision as of 09:24, 27 August 2019

Overview

This guide covers the 'Change CID Name' utility available in the Delete/Change CID program. The Delete/Change CID program is an ABIS-ONLY screen and should NEVER be accessed or operated by customers. Improper uses of the Delete/Change CID program can result in complete and unrecoverable loss of all data and extreme caution should be used when attempting any operation with this program.

Changing the CID name should be a very rare occurrence, and should only be attempted by ABIS personnel after consulting with a supervisor and senior development. Every customer's Adjutant installation is unique and there can be unforeseen issues when running the 'Change CID Name' tool. This guide is designed to cover the process, but may not cover every potential situation.

The 'Change CID Name' utility is designed to update all database instances of the previous CID name to the desired new CID name. The utility does not change the Adjutant folder structure for the Adjutant installation. If the CID change requires that the folder structure be updated, the development team will have to be involved to coordinate all of the required database moves. Changing the Adjutant folder structure may require system down-time, and may be a billable service. Consult your supervisor for guidance.


Preparation for CID Name Change

Review SQL Data

  1. In SQL, clear any IKEY data in the SOCANSWER table. The SOCANSWER table no longer uses the IKEY to link to the other SOC-related tables. If the 'Change CID Name' utility finds an IKEY in SOCANSWER linked to an inactive item, it will just delete the SOCANSWER record, which may cause issues.
  2. In SQL, review the ITEMDET table for any records with a blank CID entry. Address any blank CID records before running the 'Change CID Name' utility.
  3. In the Delete/Change CID screen, use the 'Check for Blank CID Records' utility to perform a system-wide SQL check for any empty CID fields. Noe that this utility will find ALL SQL tables with an empty CID field, even though it may be valid for certain SQL tables to have an empty CID field.
    1. As the utility processes, it will display the SQL table name and the total number of records in that table that contain a blank CID value.
    2. Review each displayed table and determine if action is needed to address the blank CID names in each table.
    3. The utility can be re-run as many times as needed after addressing any issues.


Coordinate with Customer

  1. Communicate clearly that the CID name change process will require every user to be logged out of the system during the process. The actual name change process is generally very fast and may only take a minute or more. However, the post-change validations may take longer. The process should occur after-hours, and proper expectations for system down-time should be set.
  2. Coordinate with an on-site resource to update the CID name text inside of the CString.TXT file inside of all AjTermC folders on PCs tat are running scanner base stations.
  3. Before processing the utility, use the 'Clear User Logins' screen to log all users out of Adjutant.


Changing the CID Name

Switch to the target CID and access the Delete/Change CID screen

Select the 'Change CID Name' radio button

Enter the current CID name in the Old CID field Enter the desired new CID name in the New CID field

After triple-checking all entries, click the Process button








Create the New CID Record

  • From CID Maintenance, Add the CID details for the new customer. The ‘CID’ value sets the CID name. Saving the record will prompt a ‘Copy Settings From’ screen.
  • You will not be able to fill in the MASTER ENT value until after you create the new CID and the new MASTER ENT record.
  • Select the following records in the ‘Copy Settings from’ screen and press ‘Copy’. A series of processes will run to create the new CID. Do not interrupt these processes. It usually only takes a minute for hosted customers.
    • Fiscal Calendar
    • System Rules
    • CID Defaults and Setup Options
    • User Security Tokens

Copy CID.png

  • Exit Adjutant and log back in to access the newly created CID.


Update the CSTRING.TXT File

  • Locate the CSTRING.TXT file in the Adjutant folder and edit the CID name to match your new CID. This file determines which security method (New vs. Old) is used, among other things.

CSTRING.png


Create the Master ENT Organization

  • Set the CID drop-down to the new customer, and create an Organization for the new company. Match the Organization ID to the CID. Assign the following attributes:
    • Bill To / Ship To / Sold To
    • Inventory Owner
    • Remit To / Sold From


Complete the Initial CID Basic Setup

Complete the following setup items in CID Maintenance.

Update Master ENT

  • Update the 'Master ENT' value in CID Maintenance to the newly created Org ID from the previous step.

Set the GL Mask

  • The GL Mask in the CID Maintenance - Accounts tab must be updated via SQL with the following QRY
    • Update CID set GLMASK = 'X-XXXX-XX' where CID = 'AAAA' (Set the GL Mask to the desired format using X and – characters. Replace ‘AAAA’ with actual CID)

Complete the GL Accounts / Warehouse / Held For Setup

In order to proceed with the next steps, you must add at least one GL account and a default Warehouse. Ideally, you should import the full chart of accounts at this step. However, If the complete chart of accounts is not available at this point, you can use a temporary GL account that will have to be replaced later.

  • Once you have a chart of accounts, or at least one active GL account, add the default Warehouse record.
  • The default Warehouse name should match the CID name. In most cases, the ‘Default Location’, ‘Active’, and ‘Production Plant’ checkboxes should be checked. You must complete the blank GL accounts in the ‘Account’ tab in order to save the record. The add process will create a new Organization with a ‘Warehouse Location’ attribute.
  • Note - Do not check the "Distribution Whse' box unless you know how it is used. It will prevent the Warehouse from being used in Order Entry.

Warehouse1.png

Warehouse2.png

  • Update the ‘Item Held For Codes (HOLDER) Rule Maintenance record to replace the entry for MASTER with the new customer name and vendor number.


Update the DROPFOLDERS Rule

The DROPFOLDERS rule will have the file path from the MASTER CID. Each rule detail record will need to be updated with the correct file path for the new installation.

All file paths should be entered with the full UNC path. Certain Inbox reader functions require the UNC path, rather than just the drive letter and folder structure.

  • Follow the procedure outlined below (or perform 30 individual edits to paste the right path prefix into each rule detail)
  • In SQL, run the following query to show the RHYKEYNO and the rule details associate with the DROPFOLDERS rule for the new CID. Replace the AAAA value in the query with the new CID name.
    • Select rhkeyno, keyno, text2 from rd where rhkeyno in (select keyno from rh where name = 'dropfolders' and cid = 'AAAA')
  • All rule detail records from the SQL query above should have the same same RHEYNO value, which is the keyno value of the DROPFOLDERS rule header record that you will need to replace in the next query.
  • All rule detail records should have '\\948121-APP01\ABIS\MASTER' in the TEXT2 field in front of the '\DROPFOLDERS\ . . .' path details. This is the base file path that you will need to replace in the next query. You will also need the new UNC file path that will replace the MASTER base file path.
  • In SQL, run the query below to perform a find/replace on the file path in the TEXT2 field. Replace 'master file path' with '\\948121-APP01\ABIS\MASTER' from the query above. Replace 'new file path' with the new CID's base file path. Replace the '####' RHKEYNO value with the RHKEYNO shown from the query above. The single quotes around 'master file path' and 'new file path' are part of the query format and must be there.
    • Update rd set text2 = replace(text2,’master file path’,’new file path’) where rhkeyno = ####
      • An example query would look like - Update rd set text2 = replace(text2,’\\948121-APP01\ABIS\MASTER’,’\\SERVER1234-APP\APPS\ADJ\STEELMAX’) where rhkeyno = 2999
  • You can re-run the first query above to confirm that the replace worked as expected. If there are any issues, adjust the second query as needed to replace the base/new file path text with the desired details. You can test that the DROPFOLDERS path is working by trying to access the Document Vault from an Adjutant organization record and checking the 'Open in Root Folder' button.


Fix the ABIS _ADMIN record

The hard-coded _ADMIN (or BACKDOOR) security record relies on a Contact record in the primary CID that has a USERID of '_ADMIN'. In order for this record to work properly, it needs to either be repointed to a Contact record in the new CID, or it needs to be recreated entirely.

  • Option 1 – Point the ‘_ADMIN’ record from the copied MASTER CID to a new Contact (retains all security overrides from MASTER)
    • Add an ‘Abis Admin’ contact record in the new CID and add the ‘User in Adjutant’ attribute, but click on the X to close the User in Adjutant screen without saving it.
    • In SQL, make a note of the contid for the Abis Admin record in VCONTACT table.
    • In SQL, find the keyno value for the existing _ADMIN Userid in the USERID table (it should be 115)
    • In SQL, run the QRY below and replace the CONTID value for the _ADMIN record, and replace the keyno with the keyno from previous step:
      • update userid set contid = ##### where keyno = ###
    • Exit Adjutant and log back in, and clicking on the Contact button should display your Abis Admin contact.
    • Edit the User in Adjutant record to set the Default CID and Default WHSE values.
  • Option 2 – Delete the ‘_ADMIN’ UserID and recreate it
    • In SQL, delete the entire USERID table (it should only contain _ADMIN and any test records from the MASTER CID at this point)
    • Add an ‘Abis Admin’ contact record and assign the ‘User in Adjutant’ attribute.
    • Set the UserID to ‘_ADMIN’ and set the Password to ‘XXXX’ (the password doesn’t matter, it is set elsewhere).
    • Clear the ‘Active User’ flag and any other ‘Named User’ flags. Set the default fields appropriately.
    • Exit Adjutant and log back in, and clicking on the Contact button should display your Abis Admin contact.

Move Email Templates to the New CID

Email Templates are currently not copied in the CID Copy process. They should all exist in the EMAILSETTING SQL table under the MASTER CID.

  • Run the following SQL QRY to ‘move’ the MASTER Email Templates to the new CID:
    • update emailsetting set CID = 'AAAA'


Update Form and Report Filenames With the New CID

The MASTER customized forms and reports should all exist under the Adjutant main folder with ‘MASTER’ in the form name. These will need to be renamed in order to default as the Default Custom form in each application's Message Control screen.


Option 1 - Use PowerShell to replace the CID (MASTER) value on all file names

  • Launch Windows PowerShell from the RDP Start menu.
  • Type 'X:' (where X is the root drive letter of the Adjutant folder on the RDP server) and hit Enter to access the root folder. Or you can use 'CD\' and hit Enter.
  • Change to the desired CID's Adjutant directory, one folder at a time with the 'CD XXXX' command. If PowerShell lets you change directly to a subfolder, can't figure it out.
    • Type 'CD CID' then Enter (Replace CID with your customer's CID folder name, or first-level folder name)
    • Type 'CD ADJUTANT' then Enter (If they are using something other than 'ADJUTANT' as their main folder, replace with their main folder name)
    • For example, to access the live Adjutant folder in 'X:\Resource\Apps\LiveAdj\', you would do that in 3 steps - 'CD RESOURCE', then 'CD APPS', then 'CD LIVEADJ'.
    • The 'DIR' command will list all folders and files in the selected directory.
  • Copy the expression below and paste into the PowerShell cursor to rename all FRX files. IMPORTANT - replace the text 'newcid' with your customer's CID name

Get-ChildItem -Filter "*master.frx" | Rename-Item -NewName {$_.name -replace 'master.frx', 'newcid.frx'}

  • Copy the expression below and paste into the PowerShell cursor to rename all FRT files. IMPORTANT - replace the text 'newcid' with your customer's CID name

Get-ChildItem -Filter "*master.frt" | Rename-Item -NewName {$_.name -replace 'master.frt', 'newcid.frt'}

Type 'EXIT' and then Enter to close PowerShell.


Option 2 - Use File Explorer to individually replace the CID (MASTER) value in each file name

  • The FRT/FRX filenames can be renamed in File Explorer to replace ‘MASTER’ with the new CID name.
    • Set the view mode to detail, and set the search options to exclude subfolders.
    • Navigate to the customer's Adjutant folder.
    • Use the folder search tool and search for *MASTER.FR* to return a list of all files with MASTER in the file name. There may be more than just form files here.
    • Highlight each file, then single-click on the file name to edit the file name. Replace MASTER with the new CID. Do not change any other file name details. TIP – the arrow keys and TAB key will navigate you through each file and keep you in edit mode.
    • These do not all have to be changed at this time. They can be updated as setup proceeds in each module.

RenameFile2.png


Update the Forms Logo File

All MASTER forms are set to use the generic logo file names listed below. Saving the customer's logo in the Adjutant folder with the correct name will automatically pull to each form.

  • Replace the default logo files with customer logo files.
    • Save the customer logo in the Adjutant folder as three files:
      • LOGO_SM.BMP (small logo that should not be scaled up)
      • LOGO_MD.BMP (default logo, average size/quality that should scale well on most forms)
      • LOGO_LG.BMP (large logo, only used for custom forms with large logo)
        • The existing files with these names can be deleted or renamed.
    • After changing the logo files, you will need to exit and log back in to see any updates.


Delete the MASTER CID records

The MASTER CID can be deleted at any time after the steps above are complete, but MUST be deleted before customers begin accessing the system.

  • MAKE ABSOLUTELY SURE you are in the right RDP and Environment before proceeding.
  • From the new CID, run Delete/Change CID, set the CID to MASTER and select ‘Delete CID’ then Process.

Delete CID.png

  • You will see a series of warnings. If you are in the correct environment, proceed.
  • Once that completes, run the ‘Remove Orphan Data’ option and Process.


Continue to the System Manager Setup Guide

At this point, the CID should be basically functional, and you can continue with setting up remaining CID Maintenance items and other applications.

http://www.abiscorp.com/faq/index.php?title=System_Manager_Setup_Guide