Having some trouble getting the new C# code to work in Kinetic after upgrading from Epicor 9.05.
Code Purpose: loops through all the records in the ttQuoteDtl table where the RowMod field is not empty and the Character02 field is not less than or equal to zero.
For each record, it checks the number of comma-separated values in the Character02 field using the num-entries function, and compares it to the value of the SellingExpectedQty field.
If the two values are not equal, it calls the PublishInfoMsg procedure (which is expected to exist in a library called lib) and passes an informational message that contains the number of comma-separated values and the value of the SellingFactor field.
Orginal ABL code:
//for each ttQuoteDtl where ttQuoteDtl.RowMod ne “” and ttQuoteDtl.Character02 gt “”.
if num-entries(ttQuoteDtl.Character02, “,”) ne ttQuoteDtl.SellingExpectedQty then
{lib\PublishInfoMsg.i &InfoMsg=“'The Tag Qty of ’ + string(num-entries(ttQuoteDtl.Character02, ‘,’)) + ’ is not equal to the Selling Qty of ’ + string(ttQuoteDtl.SellingFactor)”}.
end.
New c# code:
foreach (var ttQuoteDtl in ttQuoteDtlList)
{
if (ttQuoteDtl.RowMod != "" && ttQuoteDtl.Character02 > "")
{
if (ttQuoteDtl.Character02.Split(',').Length != ttQuoteDtl.SellingExpectedQty)
{
string infoMsg = "The Tag Qty of " + (ttQuoteDtl.Character02.Split(',').Length).ToString() + " is not equal to the Selling Qty of " + ttQuoteDtl.SellingFactor.ToString();
PublishInfoMsg(infoMsg);
}
}
}
Errors:
"The name 'ttQuoteDtlList' does not exist in the current context"
"The name 'PublishInfoMessaget' does not exist in the current context
