Do not invoke BOs in Data Directives, I hope you meant Method Directive. One should never invoke BOs from a Data Directive, hence why its not even available as a widget there.
You can complete this easily with no code, using widgets in Method Directives.
You need to do a trace and complete the other calls it is something along the lines of. (Please note this is just example, your trace may have different method names)
- GetNewInvcMisc
- OnChangeMiscCharge
- OnChangeMiscDocActualAmt
- Update
// Example of Receipt Misc Automation
var dsNew = new Erp.Tablesets.ReceiptTableset();
bo.GetNewRcvMisc(ref dsNew, vendorNum, purPoint, packSlip);
bo.OnChangeMiscCharge(vendorNum, purPoint, packSlip, 0, "FRTI", ref dsNew);
bo.OnChangeMiscDocActualAmt(vendorNum, purPoint, packSlip, 0, _value, ref dsNew);
dsNew.RcvMisc[0].CommentText = "Automatically Applied from PO";
dsNew.RcvMisc[0].RowMod = IceRow.ROWSTATE_ADDED;
bo.Update(ref dsNew);