Access to a Custom Field in the BPM

A custom field (“CheckBox21”) was added to the table OrderRel. If I call or use that field ttOrderRel.CheckBox21 in BPM logic I get an error :
System.Drawing.Bitmap CS1061 ‘OrderRelRow’ does not contain a definition for ‘CheckBox17’ and no extension method ‘CheckBox21’ accepting a first argument of type ‘OrderRelRow’ could be found (are you missing a using directive or an assembly reference?)

However if I switch the code to Db.OrderRel I get not errors … Why is that ? are custom fields not allowed to be used in the temporary tables ?

Sample code:
foreach (var OrderRel_iterator in (from OrderRel_Row in ttOrderRel
where string.Compare(OrderHeaderXRow.Company, OrderRel_Row.Company, true) == 0 &&
OrderHeaderXRow.OrderNum == OrderRel_Row.OrderNum &&
OrderDetailXRow.OrderLine == OrderRel_Row.OrderLine
select OrderRel_Row))
{
var OrderRelXRow = OrderRel_iterator;
if (OrderRelXRow != null)
{
this.PublishInfoMessage(“OrderRelXRow:” + OrderRelXRow.CheckBox21 , Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, “PreRELEASE2”, “PreRELEASE2”);
that code will not work but the below code will work

  foreach (var OrderRel_iterator in (from OrderRel_Row in Db.OrderRel
                                       where string.Compare(OrderHeaderXRow.Company, OrderRel_Row.Company, true) == 0 && 
                                       OrderHeaderXRow.OrderNum == OrderRel_Row.OrderNum &&
                                       OrderDetailXRow.OrderLine == OrderRel_Row.OrderLine
                                       select OrderRel_Row))
      {
           var OrderRelXRow = OrderRel_iterator;       
          if (OrderRelXRow  != null)
            {

If you look close all I did was to replace ttOrderRel with Db.OrderRel

PLEASE HELP

I think there may be a ttOrderRel_UD. I feel like i’ve seen that table pop-up when in the BAQ BPM designer.

A couple of things. Please wrap code in so it will format. I think the below will work.

Greg

ttOrderRel.["CheckBox21"]

I haves used that table and got more errors, Therefore, that’s not the one. I could be a reference or something. I just hope someone can explain why is this happening

Greg, that did not work either.

  foreach (var OrderRel_iterator in (from OrderRel_Row in ttOrderRel
                                       where string.Compare(OrderHeaderXRow.Company, OrderRel_Row.Company, true) == 0 && 
                                       OrderHeaderXRow.OrderNum == OrderRel_Row.OrderNum &&
                                       OrderDetailXRow.OrderLine == OrderRel_Row.OrderLine
                                       select OrderRel_Row))
      {
           var OrderRelXRow = OrderRel_iterator;       
          if (OrderRelXRow  != null)
            {

// TEST
this.PublishInfoMessage(“OrderRelXRow:” + OrderRelXRow.CheckBox17 , Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, “PreRELEASE2”, “PreRELEASE2”);
}

I have no problem accessing the any field in the ttOderRel but the added fields are not allowed to be selectect for some reason when I use the query to a variable

System.Drawing.Bitmap CS1061 ‘OrderRelRow’ does not contain a definition for ‘CheckBox17’ and no extension method ‘CheckBox17’ accepting a first argument of type ‘OrderRelRow’ could be found (are you missing a using directive or an assembly reference?)

I got it Greg, (bool) OrderRelXRow[“CheckBox17”] when in a variable dataset is (bool) OrderRelXRow[“CheckBox17”]…

Thanks a lot GREG…

1 Like