Selection of Non Primary keys in Lookups in Navision

shashimerugushashimerugu Member Posts: 2
hi to all,

I have created one field in xyz Table : item1 code 20

look up for this field is : sales line table .


when i press F6 in that field(item1) sales header table lookup is coming.when i selects the perticular record then it is automatically picking the primary key field 'Document No.', but here i need 'item No.'.
is it possible in Navision to select the other than primarykey field in lookup.

pls help me out on this problem

with regards
m.sasidhar

Comments

  • Igor_BeeoneIgor_Beeone Member Posts: 80
    Hello,
    you can make a little programming on OnLookup trigger (Table/Form) to get everything you need.
    Br,
    Igor Beeone
  • selece28selece28 Member Posts: 316
    Hi,
    I dont think there's "Item No." in Sales Header/ Sales Line. If you want to get the "No."
    On Item1 TableRelation property just insert "Sales Header".No.

    Do the same if you want to use the Sales Line table

    I think this will solve ur problems
    ______________

    Regards,
    Steven
  • DenSterDenSter Member Posts: 8,305
    so you have:
    A field called "Item1"
    It has a relationship to "Sales Line"
    when you hit F6, the Sales Header lookup pops up

    :-k

    What do you want? What is your requirement? What is it that you are trying to accomplish? If you would explain what it is that you're trying to do, then we can help you come up with a solution.
  • ufukufuk Member Posts: 514
    If you want to get SalesLine Item No. by the Item No. in your XYZ table and for the similiar cases:

    CLEAR(SalesLines);
    SalesLines.LOOKUPMODE(TRUE);
    SalesLines.SETTABLEVIEW(SalesLine);
    IF SalesLines.RUNMODAL = ACTION::LookupOK THEN BEGIN
    SalesLines.GETRECORD(SalesLine);
    XYZ."Item No." := SalesLine."No.";
    END;
    Ufuk Asci
    Pargesoft
Sign In or Register to comment.