We have a BPM that looks at received parts, and under certain circumstances is supposed to send an e-mail with information.
The BPM is in Erp.Receipt.ReceiveAll (Post-Processing). I’m using this custom code:
foreach (var ttRcvDtl_iterator in (from ttRcvDtl_Row in ttRcvDtl
where (string.Equals(ttRcvDtl_Row.RowMod, IceRow.ROWSTATE_UPDATED, StringComparison.OrdinalIgnoreCase) || string.Equals(ttRcvDtl_Row.RowMod, IceRow.ROWSTATE_ADDED, StringComparison.OrdinalIgnoreCase))
select ttRcvDtl_Row))
{
var ttRcvDtlRow = ttRcvDtl_iterator;
PublishInfoMessage( "RcvDtl.PartNum="+ttRcvDtlRow.PartNum+"RcvDtl.ShortChar01="+ttRcvDtlRow["ShortChar01"]+"RcvDtl.ShortChar02="+ttRcvDtlRow["ShortChar02"], Msg_Info, Msg_Indv, "debug126","debug459");
I added this info message when I noticed that the ShortChar01 and ShortChar02 fields were always blank. I couldn’t even use ttRcvDtlRow.ShortChar01 though, it kept telling me ShortChar01 didn’t exist, but the above way worked and matches how we are trying to extract the field to send in the e-mail.
The field definitely exists and has a value in the database though, as the following query proves when we run it against the database:
SELECT DISTINCT RcvDtl.ShortChar01, RcvDtl.ShortChar02, Part.PartNum
FROM Part
JOIN RcvDtl
ON Part.Company = RcvDtl.Company AND Part.PartNum = RcvDtl.PartNum
WHERE Part.PartNum='12-7654-88';
When I run this query I see values for ShortChar01 and ShortChar02.
What am I doing wrong that I am not seeing any values in the BPM?