Alt-Search Field Diff Table?

SavatageSavatage Member Posts: 7,142
edited 2007-10-10 in Navision Attain
In the Item Table I've changed the Atl-Search Field Property of "No." to
"Item UPC/EAN Number". "Item UPC/EAN Number" is a field on the item table that holds the item's UPC Code. When I enter and Item# or scan in a upc code on the sales order or credit memo all works just fine!!

Sometimes an item can have two upc codes (for whatever reason) but have the same item #. So I've used the item Varient table to hold all possible UPC codes for an item.

Now I can't simply change the Alt Search Field of the Item "No." to "Item Varient"."Item UPC/EAN Number" which would solve my problem.

I would like to scan in whatever upc code - have it search the Item Varient Table and if it finds a matching upc to enter the correct item#.
just as the Alt-Search Field Does now.

Before I being I was wondering if there are any good suggestions out there.

Comments

  • ara3nara3n Member Posts: 9,256
    two options.

    1. Create a new field where the users will enter the UPC code.
    On validate of this field. add code find the itemvariant record and then validate No. field.


    2. Change the property ValidateTableRelation to no.
    On validate of No. field add code that looks similar to this.
    IF "No." = '' THEN
      EXIT;
    IF Type <> Type::" " THEN
      Quantity := TempSalesLine.Quantity;
    
    //Start Mod
    if   type = Type::Item then begin
      ItemVariant.Setrange("Variant Code","No.");
      if ItemVariant.find('-') then
        "no." := ItemVariant."Item No."
    end;
    //End Mod
    
    "System-Created Entry" := TempSalesLine."System-Created Entry";
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.