Inventory Item Dimensions
- Size
- Colour
- Configuration
- Batch
- Serial
- Warehouse
- Location
- Pallet
xtended Data Types
Following is the table specifying the EDTs that one may need to create for new storage dimension. Reference EDT section specifies which EDT to look at while creating new EDT.
EDT Name = InventTestId
Label = Test
Extends = SysGroup
Type = String
Reference EDT = InventLocationId
Tables
New table 'InventTest' : Look at the table InventLocation for reference and create a new table InventTest. Do not forget to create the field groups, indexes, properties similar to InventLocation. You can duplicate this table and change the required fields, methods, fields groups, indexes, propeties etc.
Table InventParameters : A new method 'numRefInventTestId' needs to be created. Take method 'numRefInventSerialId' for an example while creating this method.
Table InventDim : You will have to create a new field 'InventTestId'. Add this field to field groups, 'AutoReport', 'InventoryDimensions'. Create a new index 'TestIdx' with this field, Add this field InvenyTesId to index 'DimIdx'. Modify the following methods, take cue from code for other dimensions and add the relevant code. Methods are: 'dim2dimParm', 'dimParm2dim', 'emptyDimField', 'findDim', 'findOrCreate', 'formQueryAddDynaLink', 'isFieldIdItemDim', 'isFieldIdTransferReceiptMergable', 'isFieldIdTransferTransitReceiptMergable'.
Table InventDimParm : Add a new field 'InventTestIdFlag'. Add this field to following field groups: 'AutoReport', 'Fixedview', 'View'.
Table InventSum : Add a new method named 'inventTestId'. Take cues from 'inventSerialId' method in the table.
Table InventSumDateTrans : You will have to create a new field 'InventTestId'. Add this field to field groups, 'AutoReport', 'InventoryDimension'. Modify following methods: 'initFromInventDim', 'inventDim'.
Table InventSumDeltaDim : You will have to create two new fields named 'InventTestId', 'InventTestIdFlag'. Add the 'InventTestId' field to following groups : 'AutoLookup', 'InventDim'. Add 'InventTestIdFlag' field to following groups: 'InventDimFlags'. Modify following methods: 'initFromInventDim', 'initFromInventDimParm', 'initInventDim', 'initInventDimParm'.
Table InterCompanyInventDim : You will have to create a new field 'InventTestId'. Add this field to field groups: 'AutoReport', 'InventoryDimensions', 'TmpInventDimensions'. Add the field to following indexes: 'DimIdx'. Modify following methods: 'fromInventDim', 'toInventDim', 'dim2dimParm', 'dimParm2dim', 'formQueryAddLink'.
Table PBATreeInventDim : You will have to create two new fields named 'InventTestId', 'InventTestIdVar'. Add the 'InventTestId' field to following groups : 'AutoReport', 'AllFields', 'InventoryDimensions'. Add 'InventTestIdVar' field to following field group: 'InventoryDimensions'. Add a new method named 'inventTestId'. Take cues from 'inventSerialId' method in the table.
Macros
Following is the list of macros that may need to be modified
- InventDimSelect
- InventDimJoin
- InventDimGroupAllFields
- InventDimExistsJoin
Classes
Class NumberSeqReference_Inventory : The method 'loadModule' has to be modified to create a reference for 'Test'.
Class InventDimRenameValue : Add a method 'newInventTest'. Take cue from method 'newInventSerial' for definition of this new method.
Class InventDimTracking : Modify method 'initFromArgs'. Take an example of any of the inventory dimensions for changes.
Class AxInventDim : Add parm and set methods for InventTestId field. Take example of parmInventSerialId and setInventSerialId. Modify method setTableFields to make a call to setInventTestId method.
AxInventDim_PriceDiscTable : Add method setInventTestId. Take example of setInventSerialId for definition of this method.
Class InventDimFixedClass : Add following methods : 'parmInventTestIdFlag' - Take example from parmInventSerialIdFlag method and 'inventTestIdFlag' - Take example from inventSerialId flag method. Create a macro for InventTestId in ClassDeclaration (look at declarations for other dimensions). Modify method 'fieldId2Idx'.
Class TradeInterCompany : Modify method 'createTmpInventSum'.
Class PBALib : Modify method 'createInventDim'.
Apart from these classes there are many more classes that may need modifications like InventMovement, InventUpd and its child classes. InventOnhand and related classes etc. If you want to know more you can search for keyword 'InventSerial' in the classes node and find out.
InventTest : Similar to InventSerial.
InvenTestIdLookup : Similar to InventSerialIdLookup
3 comments:
Afsar, Thanks for the walk-through for making this type of modification.
I've also learned that if you search for the Macro #InventDimDevelop you should find many of the places that need to be modified when adding a dimension.
Since posting this topic, do you have any additional tips to share for undergoing such a change?
You can add new dimension easily by just searching the MACRO, but be sure for testing, i missed some places where code should be written, in my general opinion, you have to search the macro in AOT and made your expected changes over there.
Hi,
You've created a new type of storage dimension group. Can we create a new dimension group for Item Dimension?
Like we have Size, Color, Configuration. Can we had a fourth and fifth one like Model No., Brand etc?
Post a Comment