Hi, so I have a Data Directive Erp.JobHead.Update / In-Transaction / SetJobReleasedDateTime
that works fine. I’m setting the ttJobHead.ReleasedDateTime_c field of the changed row to the BPmFunc.Now() expression
on the condition that ttJobHead.JobReleased field has been changed from False to True (which is the Released Checkbox)
I have another Data Directive that doesn’t work.
Erp.RcvDtl.Update / In-Transaction / SetReceivedDateTime
I’m setting the ttRcvDtl.ReceivedDateTime_c field of the changed row to the BPmFunc.Now() expression
on the condition that ttRcvDtl.Received field has been changed from False to True. However, the condition isn’t being met properly.
I’m suspecting that this one doesn’t work so simply because there are multiple rows and I need to get to the right row. I added a Show Message on the False condition that supports that thought. Can I add a condition or something to get this to work? Or do I need to get into custom code for working with Receipt Entry / New Receipt Line and the RcvDtl table. I just want to detect when the Received check box is checked (see screenshot).
Can you not just use the RcvDtl.ReceiptDate? It already updates the current date when you mark recieved. I note that its a Date only field, do you also need the time? If so, why not just trigger off of ReceiptDate changed?
Thanks Chris. Initially, the spec was for me to know the date and time, but yes, I might be able to live with just the date at this point. However, it would be nice to know how to complete the original vision and I will try what you suggest and circle back here.
Hi @Chris_Conn That didn’t work for me…Triggering off ttRcvDtl.ReceiptDate change only worked one time yesterday and there have been more ReceiptDate values of today. Actually, I had that same behavior when I used ttRcvDtl.Received as the trigger. We are on 10.2.300.15.
Note that the ReceiptDate on details uses the ReceiptDate from the header, which is manually entered (defaults to TODAY, when making a new packslip). If you need to know when (the date and time) someone changed that, you’ll need to use your UD field.
Say you received the shipment on 11/1 (this is the Receipt date of the header and details), marking the lines “Received”. Then for some reason you need to un-recieve them (like if the cost on the PO was WAY wrong, and AP cannot enter the invoice with such a large discrepency). If you do the un-receive, update PO, and re-receive on 11/5, your BPM would set the receipt date to 11/5.
Do you need to use this saved value in other business processes? Or are you just looking to add it so you could go back and see who touched it?
Maybe just implementing the Change Log would work. That would let you see every change, and not just the last one.
But back to your original post …
The DD will trigger once for each row. You don’t need to loop through anything. One thing that might be throwing you off is that the RcvDtl table is not updated when you change rows in Receipt Entry. Not until you make a save are all the changes written.
In the GIF below I change the Received flag on each receipt line, but the DD only triggers once I save it. And then it triggers once for each row. Had I not set Line 3 as received, only lines 1 and 2 would have triggered.