Comparing rcvdetail and podetail BPM

,

I am trying to create a new BPM that compares the cost variance between rcvdetail and podetail. We want to make sure there is not more than a $500 or 5%.

I am trying to create a dataview so i can pull in the extcost from the PODetail. I am getting this error. I do not see a reference that I am missing. I am wondering if my syntax is wrong.
image

You’re trying to use client code on the server.

Whole different ballgame.

2 Likes

so there is no way to do it then?

Yes, you’ll just have to take a different approach.

Explain in detail what you want, and one of us can point you in the right direction.

1 Like

We do not want users to receive something that is more than 500 or 5% of the original PO. We have had some users not realize something was in inches and then they enter it in feet. resulting in 500 ft instead of 500 in. Throwing everything completely off. It is usually not caught until accounting goes to pay.

Where are you trying to compare at?

IE, what point, BPM ? etc

1 Like

Erp.Receipt.CommitRcvDtl Pre-Processing

I got to run for a bit, but if someone hasn’t helped by the time I get back, I’ll try to poke at it.

1 Like

sounds great, thanks!

@jrhodesMVP I do this pre processing on UpdateMaster because for us since we are lot tracked the overage would be on the last lot and I have to take into account all of the other lots already received.
This is in code, but you could also do in a widget. You also want to check that RowMod is not D so you don’t stop deletions.

if(((ttRcvDtlRow.ReceivedQty + ttRcvDtlRow.ThisTranQty) * ttRcvDtlRow.OurUnitCost) - (ttRcvDtlRow.OrderQty * ttRcvDtlRow.OurUnitCost) >= 500)
     {
        Msg = "Release Quantity is " + ttRcvDtlRow.OrderQty.ToString("#0.##") + "\nRemaining Quantity is " + ttRcvDtlRow.OurRemQty.ToString("#0.##") + 
        "\nThis Receipt of " + ttRcvDtlRow.InputOurQty.ToString("#0.##") + " is more then $500 over and not allowed. Check Count or have buyer change PO";
        CallContext.Current.ExceptionManager.AddBLException(Msg);
     }

2 Likes

Awesome let me try this out and ill let you know how it works!

if you are not using widgets this will be in a foreach.

1 Like

The name ‘ttRcvDtlRow’ does not exist in the current context.

okay so i did this instead.

if(((RcvQty + RcvThisTransQty) * RcvOurUnitCost) - (RcvOrderQty * RcvOurUnitCost) >= 500)
{
Msg = “Release Quantity is more then $500. Check Count or have buyer change PO”;
CallContext.Current.ExceptionManager.AddBLException(Msg);
}

I then used widgets to set the temp table values to these variables. Now i just need someone to test but i think it will work.

1 Like