I have a simple BPM that shouldnt have taken me the entire day to figure out. I want the BPM to throw an exception in Sales order entry if the part doesnt exist in the Part table. To simplify things, i am just trying info message that says true when the part is in part table and false when is not. i can only get it to say either true or false for both real and fake parts. what am i doing wrong??
To troubleshoot, I’d suggest just placing a message box to display the part numbers in the ttTable. From there query your Part table to ensure that what you think does not exist, doesnt.
The tt tables aren’t updated until the after the ChangePart is complete. In other words, the tt tables in pre-processing, still have the previous values.
I found this by putting a Show Message block right after the Start block, like @Chris_Conn suggested.
With the fieldQuery of ttOrderDtl.Partnum displayed in that show msg, it always shows the value it is being changed from.
For a new Order Line, it will be blank.
Changing an exist Order Line, it shows the previous value.
EDIT: Your query that checked the ttOrderDtl and Part, would have worked as a Post Processing directive.
Its the default theme of the test environment. I actually had someone spend a couple hours entering data into the test environment, thinking it was the live DB (back when the only indicators were the server name and company name in the status bar - assuming they were even enabled). So I made it VERY obvious when you’re in the test db.
I actually added the theme to the live db, so when it is regularly copied to the test db, it is ready to be set as the default.