FMS on UDF to based on Base document type
I need to populate a UDF on an AR Invoice if the invoice is based on a sales order.
if its based on a Delivery note, it should be blank and the user needs to input info in that field.
However it's not working so well, as it populates it even when i copy from a delivery.
I didnt use the docnum = docentry in my where clause because the docnum and docentry is not the same.
SELECT DISTINCT 'from Mill' from OINV T0 inner join INV1 T1 on T0."DocEntry" = T1."DocEntry"
where T1."BaseType" = '17'
Any advise on where to change?
Should i join on the DLN1 table as well?