BPM Method Directive missing Data

I’m trying to set a BPM Data Field,
I’m in Erp.Quote.CreateOrder / Pre-Processing/Set Field
I’m trying to set the value of the field to the Sales Rep email address from the Quote, what I’ve set up below validates but when it runs it throws an error
Is there something I’ve missed?

image

It could be a timing issue. Are you sure there is data in that dataset at the time of the preprocess? Normally I default my data on the post process after the empty record is created in the dataset

The Sales Rep details are in the quote so I thought they would be in a temopary field and would pull thru, I’ve tried Pre and Post and getting the same error

I would create a data directive on the Order table, so when there is a new order (RowMod = “A”) with a linked quote number, you write a little Linq query that pulls the sales report information from the quote.

ok, I’ve only done the most simplest of data directives before, I’ll give it a crack, any tips would be welcome

What I’m trying to do is get the sales rep email address and name from the quote so I can pass them to an email and the time of converting the Quote to a Sales Order

Give it a try first. Let me know if you have questions, I can probably send you the code that goes in your data directive tomorrow :slight_smile:

A side note: the sales rep fields are concatenated in 1 field. Are you reading these from the quote header?

I found a very simple work around, all email addresses are fomatted first.last@company.com, so I did this

BpmFunc.Replace(ttQuoteHedRow.SalesRepName," " ,“.” ) + “@company.com.au

Lol, I hope you never change the domain :slight_smile:

1 Like