Item No. search

nromainnromain Member Posts: 57
Hello,

I have a problem and i need your help. I want to change the way Navision search items when you fill a part of an item No.

For instance, i have three items and one of them is the main item :

Item No. - Main item
AAAAAAAA-01 NO
AAAAAAAA-02 YES
AAAAAAAA-03 NO

In the sales lines, when i don't want to fill the whole item No., i fill AAA and then change field. Then Navision search item No and return AAAAAAAA-01 but i want it to return the main item No so AAAAAAAA-02.

Could you help me please?

Thanks.

Nicolas

Comments

  • BeliasBelias Member Posts: 2,998
    try creating a key: Main Item, Item no. and then do a setcurrentkey (with this key) in the onvalidate trigger...dunno if it works...just try...
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • nromainnromain Member Posts: 57
    Thanks for your reply.

    In fact, in the Onvalidate trigger, i'm set on record Sales Line. I cannot put a setcurrentkey on my item table. Moreover, it seems that in the onvalidate of the field, navision has already return the full item no.

    I d'ont know how do to :cry:


    Best regards,
  • BeliasBelias Member Posts: 2,998
    #-o
    right...you are not in item table :whistle:

    AFAK navision gets the first item following the primary key, and this is done with the table relation property...I don'know how to do it, sorry
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • kinekine Member Posts: 12,562
    If you want to change the way, you will need to modify the OnModify trigger or OnAfterInput trigger on th Form. There is no generic way how to change that.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.