I’m trying to create a BPM that will pass the Customer level Sales Reps to the Order level.
My only issue with this is that we built UD fields for the customer level sales reps (we needed more than just one) and so I don’t know exactly how to pass the UD field data to the non-UD sales rep fields on the Order level…
So basically I need to create a BPM that grabs Customer fields (one regular field and two UD fields) and passes it to the Order SalesPeople fields.
The fields are -
Customer.SalesRepCode
Customer.SalesRep2_c
Customer.SalesRep2_c
The fields need to be pushed to the following Order level fields (follows same order as above)-
OrderHed.SalesRepCode1
OrderHed.SalesRepCode2
OrderHed.SalesRepCode3
Is this throwing the last three errors because OrderHed.SalesRepCode1 - 3 are just binded fields on the Order Entry screen? They’re not true DB fields…
You are correct these are not valid db fields. These fields are dumped into the OrderHed.SalesRepList, They are ampersand separated. Also I dont see the other SalesRepFields in the customer table.
Try this->
var customer = (from a in this.Db.Customer
where a.CustNum == ‘CustNum’
select new { a.SalesRepCode}).FirstOrDefault();
var orderHed = (from a in this.Db.OrderHed
where a.OrderNum == 1
select a).FirstOrDefault();
I tried that (but switched where a.CustNum == ‘CustNum’ to read like where a.CustNum == “CustNum” - otherwise I was getting an error about the characters being too literal or something similar…)
Edit - I just noticed that you said you didn’t see the other SalesRepFields on the customer table - and that’s just because we have those two fields as UD fields on the Customer table in our environment.