ItemList Lookup in Consumption Journal form.

navuser1navuser1 Member Posts: 1,329
Dear all,

I have faced a problem regarding ItemList Lookup. The "Item No." field (in the Consumption Journal form) can not Lookup the Item List Form properly.

The Code under the Item No. - OnLookup(VAR Text : Text[1024];) : Boolean definitely create a problem.

What can I do ?? :-k
Now or Never

Answers

  • ara3nara3n Member Posts: 9,256
    The Item lookup on consumption journal works fine for me.
    What kind of problem do you run into?
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • navuser1navuser1 Member Posts: 1,329
    Thanks for your reply Rashed!!

    I am not able to go from Item No. 1000 Bicycle (Consumption Journal Form) to Item No. 1000 Bicycle ( Item List Form) thru Lookup. It always direct me the previous Item No. (Item List Form) where the cursor was.

    Lookup is not working perfect in NAVIN version Base db (Nav 5.0 SP1).
    Now or Never
  • AdamRoueAdamRoue Member Posts: 1,283
    Why are you doing this and not using the function to populate the journal. Also why would you consume 1000 when you make 1000 - your issue is not clear.
    The art of teaching is clarity and the art of learning is to listen
  • navuser1navuser1 Member Posts: 1,329
    AdamRoue wrote:
    Why are you doing this and not using the function to populate the journal. Also why would you consume 1000 when you make 1000 - your issue is not clear.


    Item No.(s) is different. It is an Example. :mrgreen:
    Now or Never
  • ara3nara3n Member Posts: 9,256
    yes, this is an issue. that it takes you to a different Item no on the item journal table (which is the consumption journal).

    I've reported it to MS to fix.


    Here is the link and the solution to the problem.


    https://connect.microsoft.com/dynamicss ... kID=496500
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • navuser1navuser1 Member Posts: 1,329
    Yaa!! :wink:
    This is the reply which I'm waiting for. 8)
    Thanks Rashed for your support.
    Now or Never
  • ara3nara3n Member Posts: 9,256
    You are welcome. And make sure you vote on it.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Hmm this looks like the same bug they had in version 3.10? They fixed that in 3.60, has it found its way back again?
    David Singleton
  • ara3nara3n Member Posts: 9,256
    Hmm this looks like the same bug they had in version 3.10? They fixed that in 3.60, has it found its way back again?

    Yes, In 3.6 the code was on onLookup trigger.
    In later version they created a function called Itemlookup and moved the code in there but also changed it.

    Item No. - OnLookup()
    IF "Entry Type" = "Entry Type"::Output THEN BEGIN
      SetFilterProdOrderLine;
      IF FORM.RUNMODAL(FORM::"Prod. Order Line List",ProdOrderLine) = ACTION::LookupOK THEN BEGIN
        ProdOrderLine.SETRECFILTER;
        VALIDATE("Item No.",ProdOrderLine."Item No.");
      END;
    END ELSE BEGIN
      IF Item.GET("Item No.") OR Item.GET(xRec."Item No.") THEN ;
      IF FORM.RUNMODAL(FORM::"Item List",Item) = ACTION::LookupOK THEN
        VALIDATE("Item No.",Item."No.");
    END;
    

    New code

    LookupItemNo()
    IF "Entry Type" = "Entry Type"::Output THEN BEGIN
      SetFilterProdOrderLine;
      IF FORM.RUNMODAL(FORM::"Prod. Order Line List",ProdOrderLine) = ACTION::LookupOK THEN BEGIN
        ProdOrderLine.SETRECFILTER;
        VALIDATE("Item No.",ProdOrderLine."Item No.");
      END;
    END ELSE BEGIN
      ItemList.LOOKUPMODE := TRUE;
      IF ItemList.RUNMODAL = ACTION::LookupOK THEN BEGIN
        ItemList.GETRECORD(Item);
        VALIDATE("Item No.",Item."No.");
      END;
    END;
    

    They removed in 2009 the code from the Itemlookup trigger. So that it Item journal now works in 2009, but consumptions journal still calls this functions. :(
    Ahmed Rashed Amini
    Independent Consultant/Developer


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