PO BPM to warn on Suspense GL account

The BPM condition choice was the key!
The BPM query returns a data type compatibility exception, although the same query runs fine as a normal BAQ (albeit as PORel, not ttPORel as in the BPM query). I wonder if there is casting required.

for each TranGLC no-lock  where  TranGLC.RelatedToFile = 'PORel' And  TranGLC.SegValue1 = '9999'  ,  each ttPORel no-lock  where (TranGLC.Company = ttPORel.Company and TranGLC.Key1 = ttPORel.PONum and TranGLC.Key2 = ttPORel.POLine and TranGLC.Key3 = ttPORel.PORelNum )
Good afternoon,
I am attempting to create a BPM Pre-processing directive to fire a warning when the PO is Approved while the  release GL Account field is set to "9999-00-00".
This part of the condition works fine:
the ttPOHeader.Approve field has been changed from any to True.
but this part does not:
and the PORelTGLC.GLAccount field of the changed row is equal to the "9999-00-00" expression
According to the technical details of field help, the field name "GLAccount" has a bound field: "PORelTGLC.GLAccount" which is offered within the method directive condition. The DB field however is the "TranGLC.GLAccount" and is not offered as an actionable field.
What am I missing? Epicor support can only refer me to Professional Services.
Thanks very much for any help.
Epicor v. 9.05.702A


Do you know how to access that field via a query? If so then use the condition "number of rows in the designed query is not less than 1" and design a query to check both of your conditions.
In the method PO.ChangeApproveSwitch
I would like to set a condition where the source code would go find the appropriate GLAccount from TranGLC based on the PONum attempting to be Approved:

for each PORel no-lock where  PORel.PONum = ttPORel.PONum  ,
each TranGLC no-lock  where (TranGLC.Company = PORel.Company
and TranGLC.Key1 = ttPORel.PONum
and TranGLC.Key2 = ttPORel.POLine
and TranGLC.Key3 = ttPORel.PORelNum 
and TranGLC.RelatedToFile = 'PORel' )
    if TranGLC.GLAccount BEGINS "9999"
    then do the Action
    else do nothing
How would I pass control out of the script to perform the BPM action?
You would set the BPM condition to be the "number of rows in the designed query is not less than one" Then in the "designed" part you would put in your query. So, your BPM will not fire if your query does not return any results and your query would fire if it returns a result. Then in the actions you would put what you want your action to be. You also need to make sure in your query that you are testing on your currently updated record only so you will have to modify your query a bit. I have a BPM on PO.Update which looks up the vendor part# and if it returns a record then it fires the bpm action - below is the query mine uses (I know it is completely different than what you are trying to do but seeing other examples helped me get mine going).Â

for each ttPODetail no-lock where (ttPODetail.RowMod = 'A' or ttPODetail.rowmod = 'U') and ttPODetail.VenPartNum = '', each PartXRefVend no-lock where (ttPODetail.Company = PartXRefVend.Company and ttPODetail.VendorNum = PartXRefVend.VendorNum and ttPODetail.PartNum = PartXRefVend.PartNum ) and PartXRefVend.PurchaseDefault = true


OH - and this is E9.... I am sure it is different on 10...

I will do so. That is a great tip.