I need the ability to delete a row in a child UD table (UD100A).
There is no DeleteByID BO on the UD100A table so I cannot “Invoke BO Method”.
I defined the CustomAction as “Base-Processing” BPM and called it “DeleteRow”.
The code compiles and runs without error, just that it does not actually delete the record.
Can anyone offer a suggestion as to why this is not deleting?:
using (var txScope = IceContext.CreateDefaultTransactionScope())
{
foreach(var UD100A in (from row in Db.UD100A.With(LockHint.UpdLock) where
row.Company == Session.CompanyID &&
row.CheckBox01 == true
select row))
{
Db.UD100A.Delete(UD100A);
}
Db.Validate();
txScope.Complete();
}
No go. It does not like this line of code.
I would prefer to use the BO, but nothing displays for UD100A. There is a UD100 DeleteByID, but I want to delete the child table records UD100A and not sure how I get that method syntax.
Rather than a CustomAction, should I instead put this in the UD100A.Update BPM ?
No, I did not modify the ##BASE## processing Directive.
I created a new Directive with the original code I posted and the functionality is working as I would expect.