Sorry for the thread-necro
I’m having a similar problem, I need a BPM that’ll loop through a list of a Customer’s open SO#s that do not have any POs or Jobs linked. In a BAQ, I’ve done it with couple Left Outer joins and a Where checking for null returns. But having problems converting it into a LINQ for the BPM.
I’ve tried modifying the query Nate created in another thread LINQ nullable Bool? - #6 by Randy but so far no luck.
select
oh.OrderNum as OrderNum,
oh.OpenOrder as OpenOrder,
oh.CreditOverride as CreditOverride
from OrderHed as oh
left outer join Erp.JobProd as jp
on oh.Company = jp.Company and oh.OrderNum = jp.OrderNum
left outer join Erp.PORel as PORel
on oh.Company = PORel.Company and oh.OrderNum = PORel.BTOOrderNum
where ( jp.JobNum is null and PORel.PONum is null ) and oh.OpenOrder = 1 and oh.CustNum = 'CustVar'