BPM to prevent AR Groups posting over periods

Hi All,

I could really do with some help. I am trying to create a BPM on ‘Erp.Proc.ARInvoicePost.SubmitToAgent’ I am using the Pre-Processing as what I am trying to achieve is to check the date of the group and if it is before the Earliest apply date allowed Abort the posting.

The issue I am trying to solve is people have been creating groups and leaving them open and post closing the period have then been posting them causing all sorts of issues as Epicor allows them to post in a closed period if they already existed.

Anyway where I am struggling is 2 places.

1- The date of the group doesnt appear to be in the ARInvoicePostParam table. (does this mean I am using the wrong method? or being a process do I have to get the posting dates elsewhere?)

2- Being very new to Epicor I dont know how to load a variable with a query to get the earliest apply date for the AR Invoicing Sub ledger. In fact I dont currently know how to query ANY data which is not directly available to the BPM yet?

Any assistance would be greatly appreciated. Wether it help to create this BPM or if it is to tell me I am barking up the wrong tree and there is a much better way to achieve this.

I do appreciate that there is no good reason to create an invoice group and not post it until the period is closed. But getting the processes changed here is more difficult then you could imagine so I really need to develop a fail safe to prevent the posting. Although I will also be trying to get the processes changed to prevent it being needed in the first place.

I’m using InvcGrp.PrePostInvoices.Pre to prevent AR’s from posting. You also have the group date there.

LE - for the EAD, one way to get it is directly from the EADType table. Not sure why it uses EADType1 instead of EADType, but one of them should work:

var eadd = (from erows in Db.EADType where (erows.Company==callContextClient.CurrentCompany && erows.EADType1=="AR") select erows).FirstOrDefault();
var eaddate = eadd.EarliestApplyDate;
2 Likes

Thank you very much that has given me exactly what I need. Thanks

2 Likes