BPM to stop over shipping of Material Queue records

Hi All,

I am trying to write a BPM that will throw an exception to users who are shipping items from the material queue if the following condition is true.

IssueReturnRow.TranQty > (IssueReturnRow.QtyRequired - IssueReturnRow.QtyPreviouslyIssued)

I am having trouble achieving this using the built in options within the condition widget. I get the exception when changing the tranqty to a lower value.

My research is saying that I will need to write the condition using C#, however i am not to good with that as yet.

Any help or advice would be greatly appreciated.

Tom

What have you written in your condition expression so far?

Hi Alisa,

As i said my C# skills are very average, therefore have only tried using the widgets.

If i need to go down the custom code path, i will need to learn a few new tricks over the weekend. I am an Accountant rather than an IT person and am only just starting out with coding.

I have managed to get this to work, although it is not a perfect solution.

I was using the wrong field, and changed to the below.

However, the imperfect part is that if i have a requirement of 6 units initially and by mistake enter 5 (can happen using EMWW), this must update the RequirementQty in the process down to 1. Subsequently the exception is being thrown when trying to correct back to 6.

The workaround for now is to go back to the material queue and then select the record again and everything resets, however i will keep working on making this better.

My thinking is that i will need to store the original RequirementQty in a tt and then reference that in my expression.