Our construction managers wanted a heads up when a re-order is shipped. Rather than creating another UD field in OrderHed, I suggested using public data tags instead. Unfortunately, I’m erroring out on the BPM when I try to get the tag!
A trace shows the CustShip.UpdateMaster BO getting triggered when the customer shipment is marked ‘shipped’. From here, I’m trying to use the CustShip.OrderNum to get to the OrderHed.SysRowID field. Then I can connect to the SysTag table for this order, and see if it has the tag ‘REO’.
The one-line of code to populate my Sysrow variable is erroring out with 'Result of expression cannot be assigned to variable of ‘System.String’ type. Why? The OrderHed.SysRowID field is x(36), which seems like a string.
Db.OrderHed.Where( r =>r.Company == callContextClient.CurrentCompany && r.OrderNum == dsShipHeadRow.OrderNum).Select( r =>r.SysRowID).FirstOrDefault()
Should I be approaching it a different way? Maybe if the orderhed has a data tag REO, I should also attach it to the customer shipment? And then use the data tag condition?