Expand field length of Shelf No. on Item table?

jversusjjversusj Member Posts: 489
Our Shelf No. (Item table) field is a code field with length 10.

Are their dire ramifications of expanding this field to length 15 or 20?

Obviously, we will also need to update some reports and forms, but that is cosmetic. Is there standard Navision code that will break because we expanded the length of this field?

I ask because I learned here not to expand the length of Description 1 (Item table) unless we wanted to make a ton of programming changes. I searched for this question, but could not find an existing answer.

Thanks in advance!
kind of fell into this...

Comments

  • krikikriki Member, Moderator Posts: 9,118
    I never heard of this one.

    But 1 thing you can do is: export all as text, import it in the developers toolkit and search where the field is used (remember to search also where the resulting fields are used:e.g. in Codeunit x it is transferred to a field in another table, so you also have to search on that field).
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • jversusjjversusj Member Posts: 489
    hmm.

    I am not a developer, so I cannot do as you described. I will ask our reseller, again, for their thoughts.

    Anybody else have any ideas? I believe our Shelf No. field is stock.
    kind of fell into this...
  • DenSterDenSter Member Posts: 8,307
    Here's where you will have to make additional changes:
    ================================================================================
    
    Text-Export of : Table 27 Item [Fld/Cntrl/Elem.] Shelf No. - Object Tree
    
    Company  : Toolkit
    Database : Dev Toolkit
    
    Time : 1:59:29 PM
    Date : 8/23/2006
    
    ================================================================================
    
    - Table 27 [Fld/Cntrl/Elem.] Shelf No.
      - * Where Used
        - Where Used Options
          - General
              * Object Type Table = True
              * Object Type Form = True
              * Object Type Report = True
              * Object Type Dataport = True
              * Object Type Codeunit = True
              * Object Type XMLport = True
              * Object Type MenuSuite = True
              * Object ID Filter = 
              * Search C/AL Code = True
              * Object Command Filter = 
          - Properties
              * DataItemLinkReference = True
              * DataItemTable = True
              * DrillDownFormID = True
              * LookupFormID = True
              * MatrixSourceTable = True
              * RunObject = True
              * SourceTable = True
              * SubFormID = True
              * TableNo = True
              * All 'Link'-Properties = False
              * All 'View'-Properties = True
              * CalcFields = True
              * CalcFormula = True
              * DataCaptionExpr = False
              * DataCaptionFields = False
              * GroupTotalFields = False
              * ReqFilterFields = False
              * SourceExpr = False
              * TableRelation = False
              * TotalFields = False
          - Commands
              * COPY = True
              * TRANSFERFIELDS = True
          - Assignments
              * Field = True
              * Record = True
        - Table 27 Item
            * Key 4 "Shelf No.";
          - Procedure 11 ItemSKUGet(VAR Item : Record 27;LocationCode : Code[10] ;VariantCode : Code[10])
              * IF Item.GET("No.") THEN BEGIN ...    Item."Shelf No." := SKU."Shelf No.";
        - Table 251 Gen. Product Posting Group
          - FieldTrigger OnValidate 3 Def. VAT Prod. Posting Group [Code10]
              * Item2 := Item;
        - Table 5700 Stockkeeping Unit
          - FieldTrigger OnValidate 1 Item No. [Code20]
              * "Shelf No." := Item."Shelf No.";
        - Table 7326 Whse. Worksheet Line
          - Procedure 1 CalcAvailableQty() : AvailableQty : Decimal 
              * Item2 := Item;
        - Table 7332 Whse. Internal Put-away Line
          - FieldTrigger OnValidate 14 Item No. [Code20]
              * "Shelf No." := Item."Shelf No.";
        - Table 7334 Whse. Internal Pick Line
          - FieldTrigger OnValidate 14 Item No. [Code20]
              * "Shelf No." := Item."Shelf No.";
        - Form 342 Check Availability
          - Trigger OnOpenForm 
              * COPY(Item2);
          - Local Procedure 3 ShowWarning(ItemNo2 : Code[20] ;ItemVariantCode : Code[10] ;ItemLocationCode : Code[10] ;UnitOfMeasureCode2 : Code[10] ;QtyPerUnitOfMeasure2 : Decimal ;NewItemNetChange2 : Decimal ;OldItemNetChange2 : Decimal ;ShipmentDate : Date ;OldShipmentDate : Date) : Return : Boolean 
              * Item2.COPY(Rec);
        - Form 353 Item Availability Lines
          - Procedure 1 Set(VAR NewItem : Record 27;NewItemPeriodLength : Integer ;NewAmountType : Option [Net Change,Balance at Date])
              * Item.COPY(NewItem);
        - Form 354 Item Turnover Lines
          - Procedure 1 Set(VAR NewItem : Record 27;NewItemPeriodLength : Integer ;NewAmountType : Option [Net Change,Balance at Date])
              * Item.COPY(NewItem);
        - Form 515 Item Avail. by Location Lines
          - Procedure 1 Set(VAR NewItem : Record 27;NewItemPeriodLength : Integer ;NewAmountType : Option [Net Change,Balance at Date])
              * Item.COPY(NewItem);
        - Form 5415 Item Avail. by Variant Lines
          - Procedure 1 Set(VAR NewItem : Record 27;NewItemPeriodLength : Integer ;NewAmountType : Option [Net Change,Balance at Date])
              * Item.COPY(NewItem);
        - Form 6510 Item Tracking Lines
          - Local Procedure 7 SetQtyToHandleAndInvoice(TrackingSpecification : Record 336) : OK : Boolean 
              * IF Item."Order Tracking Policy" = Item."Order Tracking Policy"::None THEN
        - Form 99000811 Prod. BOM Where-Used
          - Procedure 4 SetItem(NewItem : Record 27;NewCalcDate : Date)
              * Item := NewItem;
        - Form 99000901 Check Date Conflict
          - Trigger OnOpenForm 
              * COPY(Item2);
        - Form 99000902 Item Availability Line List
          - Procedure 1 Init(NewType : Option [Gross Requirement,Planned Order Receipt,Scheduled Order Receipt,Planned Order Release,All];VAR NewItem : Record 27)
              * Item.COPY(NewItem);
        - Report 699 Calculate Plan - Req. Wksh.
          - Trigger OnAfterGetRecord Dataitem 1 Table 27 Item
              * TempItemList := Item;
        - Report 717 Inventory - Reorders
          - Trigger OnPreDataItem Dataitem 2 Table 5700 Stockkeeping Unit
              * SETFILTER("Shelf No.",Item.GETFILTER("Shelf No."));
        - Report 5706 Create Stockkeeping Unit
          - Local Procedure 26 CreateSKU(VAR Item2 : Record 27;LocationCode : Code[10] ;VariantCode : Code[10])
              * StockkeepingUnit."Shelf No." := Item2."Shelf No.";
        - Report 7150 Item Dimensions - Detail
          - Trigger OnPreReport 
              * TempItem := Item;
        - Report 7151 Item Dimensions - Total
          - Trigger OnPreReport 
              * TempItem := Item;
        - Report 10137 Inventory Labels
          - Trigger OnAfterGetRecord Dataitem 1 Table 27 Item
              * ItemShelf[ColumnNo] :=  "Shelf No.";
        - Report 10138 Inventory to G/L Reconcile
          - Local Procedure 1 CalcAvgCostForVarLocCombo(ItemLedgEntry : Record 32) : Return : Decimal 
              * Item2.COPY(Item);
          - Local Procedure 3 CalcAvgCostForItem() : Return : Decimal 
              * Item2.COPY(Item);
        - Report 10139 Inventory Valuation
          - Local Procedure 1 CalcAvgCostForVarLocCombo(ItemLedgEntry : Record 32) : Return : Decimal 
              * Item2.COPY(Item);
          - Local Procedure 3 CalcAvgCostForItem() : Return : Decimal 
              * Item2.COPY(Item);
        - Report 10152 Picking List by Item
          - Dataitem 1 Properties
              * Property DataItemTableView SORTING(Shelf No.)
        - Report 99000753 Quantity Explosion of BOM
          - Trigger OnPreDataItem Dataitem 2 BOMLoop Table 2000000026
              * UpperLevelItem := Item;
          - Trigger OnPostDataItem Dataitem 3 Table 2000000026
              * UpperLevelItem := CompItem;
        - Report 99000754 Rolled-up Cost Shares
          - Trigger OnPreDataItem Dataitem 2 BOMLoop Table 2000000026
              * MfgItem := Item;
          - Trigger OnPostDataItem Dataitem 3 Table 2000000026
              * IF CompItem.IsMfgItem AND (CompItem."Production BOM No." <> '') THEN BEGIN
        - Report 99001017 Calculate Plan - Plan. Wksh.
          - Trigger OnAfterGetRecord Dataitem 1 Table 27 Item
              * TempItemList := Item;
        - Report 99001023 Get Action Messages
          - Trigger OnAfterGetRecord Dataitem 1 Table 27 Item
              * TempItemInOtherWksh := Item;
        - Codeunit 5400 Available Management
          - Procedure 7 ExpectedQtyOnHand(VAR NewItem : Record 27;CalcAvailable : Boolean ;ExtraNetNeed : Decimal ;VAR Available : Decimal ;PlannedOrderReceiptDate : Date) : Return : Decimal 
              * Item.COPY(NewItem);
        - Codeunit 5750 Whse.-Create Source Document
          - Local Procedure 3 CreateShptLine(VAR WhseShptLine : Record 7321) : Created : Boolean 
              * "Shelf No." := Item."Shelf No.";
          - Local Procedure 7 CreateReceiptLine(VAR WhseReceiptLine : Record 7317) : Created : Boolean 
              * "Shelf No." := Item."Shelf No.";
        - Codeunit 5812 Calculate Standard Cost
          - Procedure 7 CalcItems(VAR Item : Record 27;VAR NewTempItem : Record 27)
              * Item2.COPY(Item);
              * NewTempItem := TempItem;
          - Local Procedure 5 CalcAssemblyItem(ItemNo : Code[20] ;VAR Item : Record 27;Level : Integer)
              * TempItem := Item;
          - Local Procedure 2 CalcMfgItem(ItemNo : Code[20] ;VAR Item : Record 27;Level : Integer)
              * TempItem := Item;
          - Local Procedure 22 GetItem(ItemNo : Code[20] ;VAR Item : Record 27) : IsInBuffer : Boolean 
              * IF TempItem.GET(ItemNo) THEN BEGIN
        - Codeunit 5899 Calc. Inventory Value-Check
          - Procedure 3 RunCheck(VAR Item : Record 27;VAR NewItemLedgEntryErrBuf : Record 32)
              * WITH Item2 DO BEGIN
        - Codeunit 7152 Export Item Analysis View
          - Local Procedure 1 CreateFile(VAR ItemAnalysisViewEntry : Record 7154;ShowName : Boolean ;ItemFilter : Code[250] ;Dim1Filter : Code[250] ;Dim2Filter : Code[250] ;Dim3Filter : Code[250] ;DateFilter : Code[250] ;LocationFilter : Text[250] ;BudgetFilter : Code[250] ;Sign : Boolean) : Return : Integer 
              * TempItem3.COPY(Item);
              * TempItem2.COPY(TempItem3);
        - Codeunit 7311 Whse. Worksheet-Create
          - Local Procedure 3 CreateWhseWkshLine(VAR WhseWkshLine : Record 7326) : Created : Boolean 
              * "Shelf No." := Item."Shelf No.";
        - Codeunit 7312 Create Pick
          - Local Procedure 24 CreateTmpActLineFromCompLine(LocationCode : Code[10] ;BinCode : Code[20] ;UnitofMeasureCode : Code[10] ;ActionType : Option [ ,Take,Place];QtytoHandle : Decimal ;QtyUnitofMeasure : Decimal ;BreakBulkNo2 : Integer ;VAR TempWhseItemTrkgLine : Record 6550)
              * TempWhseActivLine."Shelf No." := Item."Shelf No.";
        - Codeunit 7321 Create Inventory Put-away
          - Local Procedure 18 GetShelfNo(ItemNo : Code[20]) : Return : Code[20] 
              * EXIT(Item."Shelf No.");
        - Codeunit 7322 Create Inventory Pick
          - Local Procedure 27 CalcInvtAvailability(WhseActivLine : Record 5767) : Return : Decimal 
              * Item2 := Item;
          - Local Procedure 21 GetShelfNo(ItemNo : Code[20]) : Return : Code[20] 
              * EXIT(Item."Shelf No.");
        - Codeunit 7380 Phys. Invt. Count.-Management
          - Trigger OnRun 
              * "No.",'','',"Shelf No.","Phys Invt Counting Period Code",
        - Codeunit 99000771 BOM Matrix Management
          - Procedure 6 CompareTwoItems(Item1 : Record 27;Item2 : Record 27;"Calc.Date" : Date ;NewMultiLevel : Boolean ;VAR VersionCode1 : Code[10] ;VAR VersionCode2 : Code[10] ;VAR UnitOfMeasure1 : Code[10] ;VAR UnitOfMeasure2 : Code[10])
              * ItemAssembly := Item1;
              * ItemAssembly := Item2;
        - Codeunit 99000793 Calculate Low-Level Code
          - Trigger OnRun 
              * Item.COPY(Rec);
              * Rec.COPY(Item);
        - Codeunit 99008526 BizTalk Product Catalog
          - Procedure 1 TransferItemLine(Item : Record 27;ProductCatalogNumber : Integer ;SendPicture : Boolean)
              * "Shelf No." := Item."Shelf No.";
        - Codeunit 99008530 Product Catalog Line-Accept
          - Local Procedure 11 CheckItemCount()
              * Item1 := Item;
        - XMLport 8002 Item
          - Fld/Cntrl/Elem. Shelf_No. [Field]
              * SourceField=Item::Shelf No.
    
    ================================================================================
    
    Microsoft Business Solutions-Navision Developer's Toolkit
    
  • DenSterDenSter Member Posts: 8,307
    You should instead just add a new field, with the datatype and length that you need, that behaves the way you want it to behave. It is MUCH easier to add new functionality than it is to modify standard NAV functionality.
  • jversusjjversusj Member Posts: 489
    Wow. Thanks for this list.

    I agree about creating a new field. I'll pass your advice on.

    We would still have to make a lot of changes for reports and forms to function as needed.
    kind of fell into this...
  • SavatageSavatage Member Posts: 7,142
    Another thought is to re-think your Shelf Bin Codes.

    Now that would be alot easier.

    Perhaps they don't have to be as complicated as you have them.

    10 digits
    0000000001..9999999999

    that's a lot of codes and I ddin't even use Letters which will bump you up to trillions of options.
  • jversusjjversusj Member Posts: 489
    I questioned that as well. The current shelf system uses a 5 digit code (soon to be 6 since they've ran out of room) plus a text suffix. Maybe we can change the way they use the suffix.

    Thanks for all of your advice, everyone.
    kind of fell into this...
  • themavethemave Member Posts: 1,058
    jversusj wrote:
    I questioned that as well. The current shelf system uses a 5 digit code (soon to be 6 since they've ran out of room) plus a text suffix. Maybe we can change the way they use the suffix.

    Thanks for all of your advice, everyone.
    I had a similar situation where I wanted to have consistence job titles entered on the employee card. I set up a table with a code field and a description field. and put all my employee job titles in this table. I also made a basic form to edit my job titles. And made it the default lookup form for the table.

    then I changed the employee table. so that job title field linked to my new job title table. so when we do data entry, the look up selects the title and it is input based on the table. Nothing is ever entered directly, and thus all titles are consistent. Users also like it better because they just select a lookup value from a list.

    Now for your situation you could set up a new table called “shelf “, it would have the code and description, the code being a 10 digit field. And the description field as long as you want. Then link this new table with the item table field “Shelf” this way your users could lookup by description and the smaller code would be input in the item card.

    This way no code units would have to be changed, and you would only have to modify a few reports to get the description. I do not have the developer license and all this can be done with just the standard report/form/and table designer granules.

    So, you would create one table, one lookup form, and modify the item table to use these to populate the shelf field. All Navision functions would be untouched and you might not even have to modify the forms, you could just print out the shelf table with descriptions for a cross reference. Otherwise you could modify the reports to include the description from your shelf table. Hope this make since.
  • themavethemave Member Posts: 1,058
    Just thought of something else.

    In Navision 2.0 we used bins (the were included in our advance distribution granuls) After upgrading to 4.0, bins required another licensed granule that was pretty expensive.

    so, instead we set up a new dimension called bin and set up our bin codes as a dimension instead. You may be able to do the same thing.
  • DenSterDenSter Member Posts: 8,307
    Yes that is all good advice, and it comes down to a way that the standard field won't cause any problems with existing objects, and you can identify the objects that you want to extend with new fields. That is a much smoother approach than to modify existing field lengths.
Sign In or Register to comment.