The thing with revisions is… you won’t have a BOM if you don’t have a revision. So for those, you don’t care… as the recursive and anchor are joined solely for the purposes of pulling up the BOM of the material record (if there is one). So in that case, no revision doesn’t matter.
For too many revisions, I found that I had to create a couple additional subqueries in order to pick out the most recent effective date from approved revisions so that I always only end up with 1. I did it in two steps. Someone more proficient may be able to do it in one. I’ll attach my BAQ so you can review that part. Originally I was picking off only approved revisions from the PartRev table… but sometimes we have more than 1 approved… and that was jazzing things up. So I had to take it a step farther and ensure I was only picking the most recently effective approved revision… and that’s how Epicor does it when getting details for a job.
The two subqueries to pay attention to are GetMaxEffectiveDate and then GetCurrentRev. I believe I join the GetCurrentRev to my PartRev table and that’s how I ensure I only get 1 revision.
DMR_ProjectedCostsFast.baq (220.8 KB)