It appears that the "Completely Received" flowfield in the Purchase Header does not work properly in SQL. The flowfield looks up to the Purchase Lines "Completely Received" boolean and attempts to use the MIN method for the flowfield. The theory is that if one purchase line is not completely received (FALSE) the header reports FALSE after a CALCFIELDS.
My problem was that a completely received PO was re-opened and a couple of extra lines added. A "re-open" and "release" operation should produce a warehouse request but it did not. Investigation showed that the Warehouse Request was produced but indicated "completely handled" because the PO Header was indicating (incorrectly) that the PO was "completely received".
This behaviour does not happen on a NAV database but is happening in SQL. I can only assume that when using MIN method in a flowfield it ignores zeroes?
The solution that worked for me was to change the following on field 5732 on the Purchase Header:
METHOD = EXIST
Reverse the Sign of the Flowfield
In the TABLE FILTER add one more line
Completely Received = No
I could not find a thread for this so I am posting what worked for me!
Are there any other flowfields in NAV tables that use the MIN method????
0
Comments
-Exist("Purchase Line" WHERE (Document Type=FIELD(Document Type),Document No.=FIELD(No.),Type=FILTER(<>' '),Location Code=FIELD(Location Filter),Completely Received=CONST(No)))
instead
Min("Purchase Line"."Completely Received" WHERE (Document Type=FIELD(Document Type),Document No.=FIELD(No.),Type=FILTER(<>' '),Location Code=FIELD(Location Filter)))
(it means "Return TRUE, if there is no line which is not completely received, else return FALSE")
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
You asked on what other places this problem occurs.
I only know the sales header where the field completely shipped is used.
This is exactly the same problem.
Very logical but just as extra information.
This is still a problem in version 5.0.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
This flowfield formula will NOT work in SQL. It will only work on C/SIDE database.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
that fixes the min and max issue with sql as well as corrupt sift issue
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n