Bin List vs Bin Contents from bin code lookup: NAV bug?

CharlehCharleh Member Posts: 44
edited 2014-03-03 in NAV Three Tier
I have an issue with the lookup on the Bin Code field on the Sales Invoice Subform and I'm pretty sure I'm doing everything right (I've asked a colleague who is a long time NAV dev and they can't see an issue with what I'm doing so I'm assuming this is a bug)

I've tried this on Cronus and on my clients NAV install. The client is running 2013 build 35201. On my Cronus I have an older build (33something)

Basically - the conditions for the lookup show:
Field                         Type      Value
Document Type                 FILTER    Order|Invoice
Quantity                      FILTER    >=0
Qty. to Asm. to Order (Base)  CONST     0

The line does indeed match all of these filters, but when you lookup you get the Bin List instead of the Bin Contents List (the Bin List is the last condition for the table relation).

If I put a number in the quantity field for the line, the lookup does indeed bring up the Bin Contents List, but if I remove the quantity (or put a 0 in there which has the effect of deleting the quantity) the Bin List appears instead. Checking the table itself confirms that the Quantity is in fact '0' and checking SQL also confirms this.

I know that RTC is running .NET and there is no real concept of NULL in NAV, so I can only assume that the lookup code isn't inspecting the table itself, but is instead inspecting the displayed content of the Quantity field on the current page (which is evaluating to a null or less likely an empty string). This would mean that the >= 0 filter is failing to return TRUE and the check is matching against the next relation condition until it finds one that matches.

I've checked the subform for code behind the Bin Code field and there is none. Basically I'm getting a missed match on the condition and I'm sure I shouldn't be.

Steps to reproduce in Cronus:

1. Create a new Sales Invoice with number/sell to cust
2. Add an item
3. Lookup on the Bin Code field, you should get Bin List
4. Enter a value into the quantity field
5. Lookup on the Bin Code field, you should get Bin Contents List

You should get Bin Contents List on both of these lookups since the only difference is Quantity and the condition specifies that Quantity should be >= 0

Anyone else confirm this for me? Anyone confirm that it works on a later build?
Charleh

Comments

  • CharlehCharleh Member Posts: 44
    Hi all, just thought I'd update on this one:

    Turns out even though the table relation was set on this table, NAV2013 is using code to do the lookup, so it turns out not to be a bug :)

    I ended up tweaking the OnLookup trigger to implement the behaviour the client wanted!
    Charleh
Sign In or Register to comment.