BPM help

I’m doing a BPM on HDCase.Update / In-Transaction.
I have a UD Table (UD09) that I need to join on (dbo.SerialNo)SerialNumber = (UD09)UnitSerialNumber. That will let me get the start date of that serial number from the UD09 table.

Then I can insert that value into the UD field (StartUpDate_c) in dbo.HDCase_UD. But I’m getting an error

bpm code
var query = from b in Db.SerialNo
            join c in Db.UD09 on b.SerialNumber equals c.UnitSerialNumber_c
            where b.Company == ttHDCase.FirstOrDefault().Company
            select new
            {
                c.StartUpDate_c,
                b.SerialNumber,
                c.UnitSerialNumber_c
            };

var result = query.FirstOrDefault();

if (result != null)
{
    var ttHDCaseRow = ttHDCase.FirstOrDefault();
    if (ttHDCaseRow != null)
    {
       ttHDCaseRow["StartUpDate_c"] = result.StartUpDate_c;
    }
}

The error message I’m getting is

Any ideas on what I’m doing wrong.

Did you re-generate the data model?

Unless you work with support, I think all the UD tables have generic field names, the _c notation is for custom fields added to existing tables. Did you ask support to add field to UD09?

I’m on prem so I can add fields to the tables. I did regenerate the data model.

Did you recycle the app server(s) and close and re-open epicor?

1 Like

I’ve not tried to use a UDField in a LINQ query, but I think you’ll need to use the Table.UDField(“fieldname”) method to access it.

Linq queries work with the fields like he has. It’s the BO table sets that you have to do that with.

1 Like

Yes. The ud field is accessible in other area’s just not how I’m trying to get to it.

Your camel case is wrong.

Don’t forget you can use CTRL+Space in a BPM for auto complete.

image

image

3 Likes

Yep, I’m an idiot I didn’t catch that. Sometimes it’s the simple things :slight_smile: Thanks!

1 Like

Bahaha!! I love this term, I am not sure I have heard it but is now my favorite!

The term “camel case”…posted on a Wednesday.

I’d be a fool to pass this one up.

Camel Humor GIFs - Find & Share on GIPHY

4 Likes

I thought that was an industry standard term. lol.

2 Likes

Apparently it is…:camel: :dromedary_camel:

1 Like

It most certainly is. Here are some other cases, just in case you were wondering.

2 Likes