I am trying to create a purchase order in a BPM. I have successfully created the PO header and the PO lines but I’m having a hard time marking the PO as Approved.
When I did the trace, the method PO.ChangeApproveSwitch is called with parameters:
ApproveValue = true
ViolationMsg = ‘’
PODataSet
My lines in the BPM are:
poTableset.POHeader[0].RowMod = “U”;
poSvc.ValidateAcctForGLControl(poTableset.POHeader[0].PONum, out outMessage);
poSvc.ChangeApproveSwitch(true, out ViolationMsg, ref poTableset);
poSvc.CheckBeforeUpdate(out cOrderChangedMsgText, out taxableChangedMsgText, out vendorChangedMsgText, “POHeader”, poTableset);
poSvc.Update(ref poTableset);
Then I go to PO Entry and the PO is not marked approve.
What am I missing?
Thanks Ernie. For now, I’m going to use your approach so I can keep moving but I am curious why my original approach didn’t work…but I’ll save that for another day.