0% found this document useful (0 votes)
5 views18 pages

CSO SCALE Coding Standards Guide

The CSO SCALE Coding Standard outlines guidelines for naming conventions, class and method structures, variable handling, string management, data handling, exception handling, file access, logging, resource management, and the use of built-in classes. It emphasizes the importance of readability, performance optimization, and proper error handling in code development. The document also provides examples for clarity on the standards being set.

Uploaded by

bineni8843
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views18 pages

CSO SCALE Coding Standards Guide

The CSO SCALE Coding Standard outlines guidelines for naming conventions, class and method structures, variable handling, string management, data handling, exception handling, file access, logging, resource management, and the use of built-in classes. It emphasizes the importance of readability, performance optimization, and proper error handling in code development. The document also provides examples for clarity on the standards being set.

Uploaded by

bineni8843
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

CSO SCALE Coding Standard

Version - 2

Created/Updated By Date Version Note


Koushik Dhar & Chaithra Hoode 07/22/2015 1 Created.
Koushik Dhar & Brian LaCluyze 04/13/2016 2 Added new guidelines and provided examples.

Assembly
 While creating a new custom assembly use below format
XXXX.<FunctionalArea>.<Type>
Where XXXX – Client Code
Functional Area – whether it is Shipping, Receiving etc.
Type – Whether it is UI, BL, RF etc.

 Avoid unnecessary assembly reference. Refer only those assemblies which are required.

Examples

1) Below are sample assembly names.


[Link]
[Link]
[Link]
[Link]

Class & Method

 Any new custom class name should be started with the 4 character client code.

 While creating a new class use namespace as the assembly name.

 Create separate class for data processing which will work only with the SQL Server. This class should be a general class. Do
not use TSO Data Processing tab to create data processing class as that is difficult to maintain and make changes.

 Use PascalCasing for all public member, type, and namespace names consisting of multiple words.

 Use camelCasing for class variables and parameter names.

 Use full caps for the constant.

 Avoid creating class instance variable if that can be achieved using local variable inside method.

 Use method name such a way that it should explain the objective/purpose of it.

Examples

1) Below are sample custom classes.


SIELStageConfirmationRF
HDGLOverridePickLocationRetrieval
TEAVLaborActivity

2) Below are few sample custom methods.


StopManualLaborActivity()
RequestShippingWorkConfirmation()
GetSplitShipmentMode()

Variable

 Choose easily readable identifier names.


 DO NOT use underscores, hyphens, or any other non-alphanumeric characters.

 Avoid using identifiers that conflict with keywords of widely used programming languages.

 Avoid using unnecessary variables.

 Always declare the variables outside of the try block.

Examples

1) Below are some sample variable names.

String Variables: stShipmentId, stError, stSession


Integer Variables: iCount, iIndex
Double Variable: dQuantity, dOnHandQty
Boolean Variables: bIsConfirmed, bPartial
DataTable Objects: dtCustomer, dtShippingLoad
Class Objects: dHelper, session, shippingLoadDO

String Handling

 While declaring a string or String variable, set it to either null or empty.

 To set string variable to empty do not use “”.

 Use [Link] or null to set empty value or null to a string variable.

 To compare two string use [Link]() or [Link]() methods.

 Use ignore case while comparing string values unless any scenario where it is mandatory to consider the case.

 To check if a string variable is empty or not use [Link]() new method.

 Use [Link]() instead of usingToString()

Examples

1) Below is a code block where we are working on one string variable.

//Declare and set the null value.


string stError = null;

stError = [Link]();

// Check if stError is empty or not.


if([Link](stError))
{
//Do something.
}
//Compare the stError with ignoring the case.
else if([Link](stError, “MSG_WrongStatus”, true)
{
//Do something.
}
Else
{
//Do something.
}

//Set null value;


stError = null;

2) Below is an example where we are converting one session variable value to string.

string stError = [Link](Session[“ERROR”]);

Data Handling

 Use DataHelper object to execute any sql statement.

 Minimize the number SQL calls to the database as this affects performance. Run multiple SQL statements in batch or create
your SQL so that it loads all the key information in minimal statements.

 Do not use SQLConnection object to access database.

 Use DataManger class to get the value of any column of any row of DataTable object.

 Write the SQL statement in easily readable format.

 Try to avoid COUNT(*) , instead of that use can use COUNT (1) as COUNT (*) decrease the performance.

 Use WITH(NOLOCK) for the select statement unless there is a need to read only the committed data.

 Create DataHelper class object using “using”.

 Use Stored Procedures to make Database calls if possible as this will give the ability to modify at a later date without code
changes and gives flexibility for future growth.

Examples

1) Below code block will use DataHelper object to execute a stored procedure call to retrieve a set of values.

public static DataTable rtrvValidationFields([Link] session, int iLoadNum)


{
DataTable dtValidationFields = null;
[Link] stSQL = null;

try
{
stSQL = "exec EX83_RTRV_VALIDATION_FIELDS @iLoadNum, NULL, 3";

using (DataHelper helper = new DataHelper(session))


{
return dtValidationFields = [Link]([Link], stSQL,
[Link]("@iLoadNum", iLoadNum));
}
}
catch (Exception ex)
{
[Link]("EX61 rtrvValidationFields catch:" + [Link]());
LogException(ex);
throw ex;
}
finally
{
stSQL = null;

if (dtValidationFields != null)
{
[Link]();
dtValidationFields = null;
}
LogEnd();
}
}

2) Below code block will fetch few column values for first one specified row from a DataTable object.

stWorkUnit = [Link](dtWorkInstructions, iRowIndex, “WORK_UNIT”);


dFromQuantity = [Link] (dtWorkInstructions, iRowIndex, “FROM_QTY”);

Exception Handling

 Use try..catch..finally block in each method of class.

 To log the exception from SCALE Application, use [Link]() method.

 Pass as many relevant parameter to the [Link]() method so that it can help while analyzing any
issue.

 Dispose all disposable object in finally block. Verify if null nor not before that.

 Set null to all nullable objects in finally block.

 Set [Link] or null to all the string variables in finally block.

Examples

1) Below statement will log an exception in SCALE Audit Log.

[Link]([Link], ex, "GMESShippingWorkConfirmation", "ConfirmNormalPick", null);

2) In Below example a DataTable object will be created and used and finally disposed.

DataTable dtWorkInstructions = null;

try
{
//Get Work instructions and store in the DataTable object.
dtWorkInstructions = [Link]();

//It checked of the DataTable object is empty or null using DataManager class.
if([Link](dtWorkInstructions))
{
//Do something.
}
else
{
//Do something.
}

return dtWorkInstructions;
}
catch(Exception ex)
{
//Do something;
}
finally
{
//It checks if the DataTable object is not null.
if(dtWorkInstructions != null)
{
//If the DataTable object is null it dispose the object and set to null.
[Link]();
dtWorkInstructions = null;
}
}

File Access

 When performing file access whether read or write, minimize the number of calls to the file.

 Each read/write does take time and will affect performance. Instead of performing a file write for each value, store all the
values in a string and then perform one file write. This is much more efficient.

Examples

1) Below is a code block which could be used to read from XML files.

XmlReaderSettings settings = null;


XmlReader xmlReader = null;

settings = new XmlReaderSettings();

[Link] = true;
[Link] = true;

xmlReader = [Link](stFile, settings);

while ([Link]())
{
//Do something.
}

Logging Mechanism & Comment

 Log all important variables in the methods which may help in future issue analysis.

 Log Start, End of new methods execution.


 Log Exceptions.

 Use existing TSO utility logging mechanism.

 Use the correct Extension/Action Item number in TSO Utility logging variable stTRACE_CLIENTPREFIX.

 Avoid logging unnecessary information.

 Avoid recursive logging as this will impact performance.

 Log all passed parameter.

 No need to convert the parameter to string as this is accept as object in log methods.

 Comment is needed only to describe the ‘why’ and not the ‘how’, means it should explain what the purpose of the method
is and not how it is going to work.

 Avoid putting unnecessary comments.

Examples

1) Below is the block code of TSO Utility for logging mechanism and can be used in any class.

#region TSO Utilities

private static string stTRACE_CLIENTPREFIX = "HDGl-EX01"; // Prefix of all Debug Statements

#region Logging Methods


[Conditional("TRACE")]
public static void LogConstructor() { LogMessage(0, "Constructor"); }
[Conditional("TRACE")]
public static void LogDispose() { LogMessage(0, "Dispose"); }
[Conditional("TRACE")]
public static void LogStart() { LogMessage(0, "Start"); }
[Conditional("TRACE")]
public static void LogEnd() { LogMessage(0, "End"); }
[Conditional("TRACE")]
public static void LogException([Link] ex) { LogMessage(1, "Exception - " + [Link]()); }
[Conditional("TRACE")]
public static void LogSQL(string stSQL) { LogMessage(0, "SQL - " + ((stSQL == null) ? "NULL!" : stSQL)); }

[Conditional("TRACE")]
public static void LogVariable(string stVarName, object o) { LogMessage(1, stVarName + " - " + ((o == null) ? "NULL!" :
[Link]())); }
#endregion Logging Methods

#region LogMessage
[Conditional("TRACE")]
private static void LogMessage(int iOffset, string stMessage)
{
// Method Variables (in order of appearance)
[Link] stack = null;
[Link] frame = null;
StringBuilder sb = null;
String stLinePrefix = null;
try
{
stack = new [Link](); // capture current spot in code we are running
frame = [Link](2); // caller is 2 "frames" (method calls) back from here
sb = new StringBuilder(); // initialize a StringBuilder

// Add Hardcoded Prefix


if (stTRACE_CLIENTPREFIX != null && !stTRACE_CLIENTPREFIX.Equals(""))
{
[Link](stTRACE_CLIENTPREFIX);
}

// Add period (.) offset for indention (defaults to at least 1)


for (int i = 0; i <= iOffset; i++)
{
[Link](".");
}

// Add period (.) offset for each method call on the stack that is in the same class
for (int i = 3; i < [Link]; i++)
{
if ([Link](i).GetMethod().[Link]([Link]().[Link]))
{
[Link](".");
}
else
{
break;
}
}

// Save this Prefix for multi-line messages


stLinePrefix = [Link]();

// Add Class and Method Name


[Link]([Link]().[Link])
.Append(".")
.Append([Link]().Name)
.Append(":");

// Add User's Message


if (stMessage != null)
{
[Link]([Link]("\n", "\n" + stLinePrefix));
}

[Link]([Link]());
}
finally
{
stack = null;
frame = null;
}
}
#endregion LogMessage

#endregion TSO Utilities


2) Use below coded to log the variables or any other log.
LogStart();
LogEnd();
LogException();
LogVariable("iIntShipNum", iIntShipNum);
LogVariable("stError", stError);

Resource Manager

 To show the text in the button, label always uses Resource Key of type Text.

 To show message use Resource Key of type Message.

 Use the method of ResourceManager class to get the text of the resource key.

 Custom resource should be inserted RESOURCE_FILE_CUSTOM table.

 For custom changes, use new resources as base resources may change.

 Use proper type whether it is Text/Message/Image/Help.

Examples

1) Below code will get the message for a message key.

string stErrMsg = [Link]([Link], "MSG_LOTTEMP01", [Link]);

2) Below code will get the label name for a level key.

[Link] = [Link]([Link], "OVERRIDEFIELD",


[Link]);

3) Below code block will find the message and replace the &[*] with the variable’s value.

stProcHistMessage = [Link]([Link], [Link],


"SIEL_STAGING_LOCATION_ASSIGNMENT_EXECUTION", [Link], null).Replace("&1",
stStagingLocation).Replace("&2", stShipmentID);

SCALE Built-in Classes

 Try to use SCALE built in classes to manipulate the data.

 Use DataHelper and DataManager for Data handling.

 Use StringManager for string handling.

 Use DateManager for date handling.

 Use ExceptionManager for exception handling.

 Use ResourceManager for resource handling.

 Use HistoryWriter to write transaction & process history.


 Use ValueFormatter for formatting the value.

 Use SystemConfigRetrieval to retrieve System Configuration values from the database.

 Use NextNumbeRretrieval class to get the next number.

Examples

1) Below statement will find the next Internal Shipment Container Num.

(int)[Link]([Link](session),
ShippingConstants._NEXT_SHIPPING_CONTAINER_NUM_KEY);

2) Below statement will find if the inventory track flag is on or not.

[Link](session, RecordTypeConstants._INVENTORY_TRACKING,
RecordTypeConstants._INVENTORY);

3) Below code will format the quantity.

[Link] = ([Link]([Link], ([Link] * -1)));

New SP/View Creation

 While creating a new SP or View use naming convention as <Client Code><Extension><SP name>. For example
HALF_EX08_ShipmentCreationWaveStep.

 Use WITH(NOLOCK) for the select statement unless there is a need to read only the committed data.

 Try to avoid use Cursor and instead use temporary tables.

 Modification history should be written in every SP/Function/View

 While writing complex DMLs, always use error handling to handle any unexpected exceptions.

Examples

1) Below is a declaration of a SP.

CREATE PROCEDURE HDGL_EX46_OverridePalletId


(
@stWorkUnit NVARCHAR(100),
@stpalletNum NVARCHAR(100),
@stOldPalletId NVARCHAR(100),
@stNewPalletId NVARCHAR(100),
@stUser NVARCHAR(100)
)
AS
BEGIN
--Do something.
END

2) Below is an example of using WITH(NOLOCK) in the select query. Make sure to use WITH(NOLOCK), not only NOLOCK.

SELECT TOP 10 INTERNAL_SHIPMENT_NUM, SHIPMENT_ID


FROM SHIPMENT_HEADER WITH(NOLOCK)

3) Each SP or View should have Modification History like below.

/*
Mod Number | Programmer | Date | Modification Description
-------------------------------------------------------------------------------------------------------------------
EX46 | MP | 08/11/15 | Created the stored procedure.
*/

Nullable Objects

 Before accessing any member of a nullable object make sure to check if the object itself is null or not, as if it is null then
trying to access the member will throw null reference exception.

Examples

1) There is one DataTable object which needs to be disposed in finally block after its use. But there is a chance that the object
may be null. So below statement can cause null reference exception.

[Link]();

So, we should always check if the object is null or not before access the method of it.

If(dtCustomer != null)
{
[Link]();
dtCustomer = null;
}

Use Base Logic

 Whenever developing any extension, try to use base logic as that logic is already tested by R&D as it will be safe to use in
our custom code and will minimize the amount of time required for the custom code. For example, in custom work
confirmation process if there is need of short pick, then create WorkDS object and call base short pick logic by passing the
object. It will save lots of coding and testing time.

Examples

1) Below code block will confirm a set of work instruction using base process.

IList<string> workToConfirmChildLU = null;


IList<string> errorCodesChildLU = null;
IConfirmOrPutawayOutboundWorkRequestInvoker invoker = null;
WorkExecutionDS workDS = null;
DataTable dtWorkInstruction = null;
string serializedWork = null;

invoker = [Link]("IConfirmOrPutawayOutboundWorkRequestInvoker") as
IConfirmOrPutawayOutboundWorkRequestInvoker;

//Get the open work instructions.


dtWorkInstruction = [Link]([Link]);
//For each work instruction create the WorkDS data and store in the list.
foreach (DataRow dr in [Link])
{
workDS = [Link](dr);
serializedWork = [Link]();
[Link](serializedWork);

//Confirm the work instruction by calling the base method.


if ([Link] > 0)
{
[Link]([Link](), out errorCodesChildLU);
}

Extension On/Off

 If client has multiple environment and the extension is only for one or few environments implement Extension On/Off
features, so that the client will enable that only for those environment which are going to use that extension.

Examples

1) There is one entry in Inventory Control Value for a extension is off or not “Is EX20 active?” with the key “EX20ACTIVE”.
Below method is to determine if the extension is active or not.

public bool DoesEX20Active()


{
string stSql = null

try
{
stSql = “SELECT SYSTEM_VALUE FROM SYSTEM_CONFIG_VALUE +
“WHERE SYS_KEY = 'EX20ACTIVE' AND RECORD_TYPE = 'Inventory'”;

using (DataHelper dtHelper = new DataHelper([Link]))


{
return [Link], stSql, null);
}
}
finally
{
stSql = null;
}
}

2) Below code will call either base or custom logic based on the extension on off.

if(this.DoesEX20Active())
{
[Link]();
}
else
{
[Link]();
}
Transaction & Process History

 While performing some transaction like updating the inventory, transferring inventory from one location to a different
location, write corresponding Transaction History for that. It will help to track the inventory movement in the warehouse.

 For all important process of the extension write Process History. It will help client and consultant to review any issue in
future. If client has multiple environment and the extension is only for one or few environments implement Extension
On/Off features, so that the client will enable that only for those environment which are going to use that extension.

 For custom process create custom process history code and transaction

Examples

1) Below is a custom method which could be used to write the process history.

private void WriteProcessHistory(string stAction, string stIdentifier1, string stIdentifier2, string stIdentifier3, string
stIdentifier4, string stMessage)
{
IHistoryWriter history = null;
ProcessHistoryDTO procHistData = null;

try
{
procHistData = new ProcessHistoryDTO();
[Link] = [Link];
[Link] = [Link];
[Link] = "ILSSRV";
[Link] = "CH07";
[Link] = stAction;
procHistData.Identifier1 = stIdentifier1;
procHistData.Identifier2 = stIdentifier2;
procHistData.Identifier3 = stIdentifier3;
procHistData.Identifier4 = stIdentifier4;
[Link] = stMessage;

history = (IHistoryWriter)[Link]("IHistoryWriter");
[Link]([Link], procHistData);
}
catch (Exception ex)
{
[Link]([Link], ex, "GMESShippingWorkConfirmation", "WriteProcessHistory", null);
}
finally
{
history = null;
procHistData = null;
}
}

2) Below is a method to write the transaction history.

private void WriteTransactionHistory(Session session, string shipId, ShippingContainer cont)


{
IHistoryWriter history = null;
TransactionHistoryDTO histData = null;
try
{
histData = new TransactionHistoryDTO();

[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = ReportingConstants._TH_TYPE_CLOSECONT;
[Link] = [Link]+"";
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = [Link];
[Link] = shipId;

history = (IHistoryWriter)[Link]("IHistoryWriter");
[Link](session, histData);
}
catch (Exception ex)
{
[Link]([Link], ex, "GMESShippingContainer", " WriteTransactionHistory ", null);
}
finally
{
history = null;
histData = null;
}
}

Exit Point

 Try to use exit point whenever it is possible.

 Make sure to configure the exit point properly.

 Use only required parameter in exit point.

 Create DB Script to create the Exit Point entry in the configuration.

 If you need to make a change to base code to call custom functionality, then only update the base code with a new exit
point. This will be an easy change to port in the event of an upgrade and will be much easier to add to base code via the
Base Modification Process at a later date.

Examples

1) Below is an example of creation of a custom exit point method.

namespace [Link]
{
public class SIELAfterLoadConfirmExitPoint : [Link]
{
public object ExecuteStep([Link] sess, object[] parms)
{
//Do something.
}
}
}
2) Below are two the examples to call the exit point.

[Link](session, WorkFlowConstants._AFTERLOADCONFIRM, this._load);

IWorkFlowManager workFlowManager = [Link]<IWorkFlowManager>();


[Link](Constants._EXITPT_WORKEXECUTION1, new object[]
{ this._gridDetail.GetCellIntValue(this._gridDetail.[Link], [Link]) });

Use of Windows Form

 If a new UI need to be designed, you can use the Windows Form rather than using Infragistics control unless there is some
need to use that.

Debug Patch

 Log only necessary variables.


 IF logging the date and time, make sure to use detail time including milliseconds.
 While logging variable of class through the object of the class make sure you are checking the object is null or not to avoid
null reference exception.
 Implement debug patch On/Off switch, so that the client can enable or disable this based on their requirement.

Examples

1) Below is the method to log data to debug file.

#region WriteToDebugFile
public static void WriteToDebugFile(String stText, string stReferenceId)
{
StreamWriter streamwriter = null;
FileStream filestream = null;
String stFilename = @"\Program Files\Manhattan Associates\ILS\2015\Log\";
try
{
if (![Link](@"C:\Program Files\Manhattan Associates\ILS\2015\"))
{
if (![Link](@"D:\Program Files\Manhattan Associates\ILS\2015\"))
{
return;
}
else
{
stFilename = "D:" + stFilename + "SDSI_" + stReferenceId + ".txt";
filestream = [Link]([Link](), [Link], [Link]);
}
}
else
{
stFilename = "C:" + stFilename + "SDSI_" + stReferenceId + ".txt";
filestream = [Link]([Link](), [Link], [Link]);
}

BufferedStream buffered = new BufferedStream(filestream);


streamwriter = new StreamWriter(buffered);
[Link](stText);
}
catch (Exception ex)
{
[Link]("Error while writing the debug logs.\r\n");
}
finally
{
if (streamwriter != null)
{
[Link]();
streamwriter = null;
}
}
}
#endregion WriteToDebugFile

2) Below is an example to log the data.

WriteToDebugFile([Link]() + " ::
[Link] : Shipment Id = " + stShipmentId, intShipId);

Use Generic Config Header/Detail For New Configurations

 If the new code change requires a new configuration, then use a Generic Configuration Header for this.

 The advantage is that this logic is already available and will consists of the SQL to create it and SQL to retrieve the values.

 This will significantly reduce the number of hours required for any new code changes.

 Please use a relevant name for the new configuration.

 For each configuration added, you can specify the lookup to be one that is coded or another GENERIC_CONFIG_HEADER
Record Type. For the coded lookups, please refer to the SDK and search for lookups as this explains how to use the GCH
table.

 Please use the SQL below as your template and update the values as needed for your use. This SQL also contains the
Security for the new configuration as well and can be put into a DbScript file for your deliverable.

Examples

1) The following will create a new configuration called “Check Digit By Company And Warehouse”. This will be located in the
Routing section of Configurations.

It will contain 4 configurations and all of them will have dropdown using lookups.
Simply running the following SQL will create the new configurations in seconds and there will not be any unnecessary time
wasted on creating a new screen or modifying a base screen.

DELETE GENERIC_CONFIG_DETAIL WHERE RECORD_TYPE = N'Check Digit By Company And Warehouse'


DELETE GENERIC_CONFIG_HEADER WHERE RECORD_TYPE = N'Check Digit By Company And Warehouse'
DELETE SECURITY_CHECKPOINT WHERE FORM_ID IN
(SELECT FORM_ID FROM FORM WHERE FORM_KEY_NAME = N'UI_GENCheck Digit By Company And Warehouse' AND
PARENT_KEY_NAME = N'UI_CFGNODEGNRT')
DELETE FORM WHERE FORM_KEY_NAME = N'UI_GENCheck Digit By Company And Warehouse' AND PARENT_KEY_NAME =
N'UI_CFGNODEGNRT'

INSERT INTO GENERIC_CONFIG_HEADER


(RECORD_TYPE,DESCRIPTION,SYSTEM_CREATED,
SYS1_FIELD_NAME,SYS1_FIELD_TYPE,SYS1_FIELD_LOOKUP,SYS1_REQUIRED,
SYS3_FIELD_NAME,SYS3_FIELD_TYPE,SYS3_FIELD_LOOKUP,SYS3_REQUIRED,
SYS2_FIELD_NAME,SYS2_FIELD_TYPE,SYS2_FIELD_LOOKUP,SYS2_REQUIRED,
SYS4_FIELD_NAME,SYS4_FIELD_TYPE,SYS4_FIELD_LOOKUP,SYS4_REQUIRED,
SYS5_FIELD_NAME,SYS5_FIELD_TYPE,SYS5_FIELD_LOOKUP,SYS5_REQUIRED,
USER1_FIELD_NAME,USER1_FIELD_TYPE,USER1_FIELD_LOOKUP,USER1_REQUIRED,
USER2_FIELD_NAME,USER2_FIELD_TYPE,USER2_FIELD_LOOKUP,USER2_REQUIRED,
USER3_FIELD_NAME,USER3_FIELD_TYPE,USER3_FIELD_LOOKUP,USER3_REQUIRED,
USER4_FIELD_NAME,USER4_FIELD_TYPE,USER4_FIELD_LOOKUP,USER4_REQUIRED,
USER5_FIELD_NAME,USER5_FIELD_TYPE,USER5_FIELD_LOOKUP,USER5_REQUIRED,
USER6_FIELD_NAME,USER6_FIELD_TYPE,USER6_FIELD_LOOKUP,USER6_REQUIRED,
USER7_FIELD_NAME,USER7_FIELD_TYPE,USER7_FIELD_LOOKUP,USER7_REQUIRED,
USER8_FIELD_NAME,USER8_FIELD_TYPE,USER8_FIELD_LOOKUP,USER8_REQUIRED,
USER_STAMP,PROCESS_STAMP,DATE_TIME_STAMP)
VALUES
(N'Check Digit By Company And Warehouse',N'Check Digit By Company And Warehouse',N'N',
N'Company',N'Alpha',N'ConfigType|Company',N'N',
N'Warehouse',N'Alpha',N'ConfigType|Warehouse',N'N',
N'Carrier',N'Alpha',N'ConfigType|Carrier',N'Y',
N'Pro Number',N'Alpha',N'ConfigType|ProNumber',N'Y',
NULL,NULL,NULL,N'N',
NULL,NULL,NULL,N'N',
NULL,NULL,NULL,N'N',
NULL,NULL,NULL,N'N',
NULL,NULL,NULL,N'N',
NULL,NULL,NULL,N'N',
NULL,NULL,NULL,N'N',
NULL,NULL,NULL,N'N',
NULL,NULL,NULL,N'N',
N'MANHATTAN',N'dbChangeEX59b',GETDATE())

BEGIN
DECLARE @FORM_ID NUMERIC(9)

SET @FORM_ID = (SELECT TOP 1 FORM_ID + 1 FROM FORM ORDER BY FORM_ID DESC)

INSERT INTO FORM


(FORM_ID,FORM_KEY_NAME,PARENT_KEY_NAME,SECURITY_ACTIVE,USER_STAMP,PROCESS_STAMP,DATE_TIME_STA
MP,SYSTEM_DB_SCREEN)
VALUES
(@FORM_ID,N'UI_GENCheck Digit By Company And
Warehouse',N'UI_CFGNODEGNRT',N'Y',N'MANHATTAN',N'dbChangeEX59b',GETDATE(),N'N')

INSERT INTO SECURITY_CHECKPOINT

(CHECK_POINT,FORM_ID,RESOURCE_FILE_KEY,SYSTEM_CREATED,USER_STAMP,PROCESS_STAMP,DATE_TIME_STAMP)
VALUES (1,@FORM_ID,N'RUN',N'N',N'MANHATTAN',N'dbChangeEX59b',GETDATE())

INSERT INTO SECURITY_CHECKPOINT

(CHECK_POINT,FORM_ID,RESOURCE_FILE_KEY,SYSTEM_CREATED,USER_STAMP,PROCESS_STAMP,DATE_TIME_STAMP)
VALUES (2,@FORM_ID,N'NEW',N'N',N'MANHATTAN',N'dbChangeEX59b',GETDATE())

INSERT INTO SECURITY_CHECKPOINT


(CHECK_POINT,FORM_ID,RESOURCE_FILE_KEY,SYSTEM_CREATED,USER_STAMP,PROCESS_STAMP,DATE_TIME_STAMP)
VALUES (3,@FORM_ID,N'CHANGE',N'N',N'MANHATTAN',N'dbChangeEX59b',GETDATE())

INSERT INTO SECURITY_CHECKPOINT

(CHECK_POINT,FORM_ID,RESOURCE_FILE_KEY,SYSTEM_CREATED,USER_STAMP,PROCESS_STAMP,DATE_TIME_STAMP)
VALUES (4,@FORM_ID,N'COPY',N'N',N'MANHATTAN',N'dbChangeEX59b',GETDATE())

INSERT INTO SECURITY_CHECKPOINT

(CHECK_POINT,FORM_ID,RESOURCE_FILE_KEY,SYSTEM_CREATED,USER_STAMP,PROCESS_STAMP,DATE_TIME_STAMP)
VALUES (5,@FORM_ID,N'DELETE',N'N',N'MANHATTAN',N'dbChangeEX59b',GETDATE())

INSERT INTO SECURITY_CHECKPOINT

(CHECK_POINT,FORM_ID,RESOURCE_FILE_KEY,SYSTEM_CREATED,USER_STAMP,PROCESS_STAMP,DATE_TIME_STAMP)
VALUES (6,@FORM_ID,N'DISPLAY',N'N',N'MANHATTAN',N'dbChange

You might also like