Hi Guys
I have created a function in the item list page that uses a flow field for vendor (second vendor) and it does not work when using in SetRange filter.
In below code first sample using flow field for Vendor does not work however if I use the standard Item vendor field in the second example it works:
//flow field doesn’t work
begin
PurchasePrice.Reset();
PurchasePrice.SetRange("Item No.", pItemNo);
CalcFields(FlowFeildSupplier1);
PurchasePrice.SetRange("Vendor No.", Rec.FlowFieldSupplier1);
if PurchasePrice.FindFirst() then
Supplier1Price := PurchasePrice."Direct Unit Cost";
exit(Supplier1Price);
end;
//works
begin
PurchasePrice.Reset();
PurchasePrice.SetRange("Item No.", pItemNo);
PurchasePrice.SetRange("Vendor No.", Rec.”Vendor No.”);
if PurchasePrice.FindFirst() then
Supplier1Price := PurchasePrice."Direct Unit Cost";
exit(Supplier1Price);
end;
Any ideas or workarounds welcome