Have a standard data directive on JobOper that works for creating Purchase Orders for our intercompany subcontract operations. I can open the PO that is created, check approve and get no errors. However, as soon as I try to automate the approval itself, I run into issues.
I decided to run a trace on the approve switch, the methods called, in order, are ChangeApproveSwitch, CheckBeforeUpdate and Update.
I tried replicating this in my BPM, but getting this error:
I looked through the BOs under PO and Iām not seeing any called setPORelShipToAddress. Whatās really odd is this to the job, not an order number or a drop ship, so Iām not sure why itās asking for a ship to when itās not required.
Trying to create and approve the whole PO. I can get it created, and I can go in and manually approve it. But if I try automate the approval it errors out.
Yes sir, I use an āUpdateā widget after creating the line, setting the transaction type and setting the Job, Assembly and Operation. It will create the PO, and if I go look at the PO the line/release exist, the approve box is active. I just canāt get it to do the approval through the BPM.
Changed the methods around and made no difference, still fails with the same null reference exception, referring to the method āsetPORelShipToAddressā. PO is still created, line and release is there, Approve is active but not checked. The release shouldnāt need a ship to, itās for a subcontract operation on a job. The Ship To Cust field is greyed out on the release.
You must be on a new version than I. In 10.2.300, DDās only have an āInvoke External Methodsā widgets. Iād have to use a MD to use the āInvoke BO Methodā.
Also, I donāt get that nice list of āActionsā in the Workflow Designer.
edit
DāOh! - I see that it becomes a list when you select more than one.
Why do you need the CheckBeforeUpdate and Update 1 after the ChangeAppSwitch?
Iām not saying that you definitely saying that you donāt need them. Iād have though that the ChangeAppSwitch would be the last thing to do on the PO.