Hi All,
Looking for some advice on a BPM I’m working on to add approvals and lockdowns of a payment entry.
The workflow is:
- Group Created (APChkGrp)
- Payments Added (CheckHed)
- Approve All Payments (APChkGrp)
- Approval Data <user, datetime> Stamped (CheckHed)
- Group/Payments Locked (APChkGrp,ChecHed)
- Only FA’s Can Post
UD Fields Created:
APChkGrp_UD.ApproveAll_c
CheckHed_UD.Approved_c
CheckHed_UD.ApprovedBy_c
CheckHed_UD.ApprovedDate_c
I’ve tried to come at this with a low code/no code approach but seem to be hitting a brick wall with setting this up between the 2 methods involved (Erp.BO.APChkGrp & Erp.BO.PaymentEntry). I’ve since turned to a C# approach but fairing no better.
Currently standing at using a post processing on Erp.BO.APChkGrp.Update:
Condition: The ds.APChkGrp.ApproveAll_c field of the updated row is equal to the true… expression.
If True:
string approvedBy = Session.UserID;
DateTime approvedDate = DateTime.Now;
foreach (var grpRow in ds.APChkGrp)
{
if (grpRow.ApproveAll_c == true)
{
string apChkGrpID = grpRow.GroupID;
var checks = (from chk in Db.CheckHed
where chk.GroupID == apChkGrpID
select chk);
foreach (var check in checks)
{
check.ApprovedBy_c = approvedBy;
check.ApprovedDate_c = approvedDate;
check.Approved_c = true;
}
}
}
The error of “CS1061 ‘APChkGrpRow’ does not contain a definition for ‘ApproveAll_c’ and no accessible extension method ‘ApproveAll_c’ accepting a first argument of type ‘APChkGrpRow’ could be found (are you missing a using directive or an assembly reference?)” is popping up and, not being too well versed in C#, my troubleshooting is limited.
Any advice on if a low code/no code option is viable or, if not, any troubleshooting pointers on where I’m going wrong with the C# would be greatly appreciated.
Edit to add, I’m using ds.APChkGrp
Rgds,
Barry