# BPM Method Directive missing Data

**URL:** <https://www.epiusers.help/t/bpm-method-directive-missing-data/65804>\
**Category:** Epicor ERP 10\
**Tags:** bpm\
**Created:** [March 26, 2020, 1:01am UTC](https://www.epiusers.help/t/bpm-method-directive-missing-data/65804 "2020-03-26T01:01:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![LBARKER](https://www.epiusers.help/user_avatar/www.epiusers.help/lbarker/32/31072_2.png) [@LBARKER](https://www.epiusers.help/u/LBARKER)\
**Post date:** [March 26, 2020, 1:01am UTC](https://www.epiusers.help/t/bpm-method-directive-missing-data/65804/1 "2020-03-26T01:01:48Z")

</div>

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](https://epiusers.help/uploads/default/original/3X/1/c/1ccf9c93821a6ba9b06eca4def3cf52691233a97.png)

![image](https://epiusers.help/uploads/default/original/3X/3/f/3fce3ce4031e3183230d1ef89f2b77f9790e1e81.png)

---

<div class="post-metadata">

**Author:** ![Christian\_Pouchoulen](https://www.epiusers.help/user_avatar/www.epiusers.help/christian_pouchoulen/32/15397_2.png) [@Christian\_Pouchoulen](https://www.epiusers.help/u/Christian_Pouchoulen)\
**Post date:** [March 26, 2020, 2:23am UTC](https://www.epiusers.help/t/bpm-method-directive-missing-data/65804/2 "2020-03-26T02:23:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![LBARKER](https://www.epiusers.help/user_avatar/www.epiusers.help/lbarker/32/31072_2.png) [@LBARKER](https://www.epiusers.help/u/LBARKER)\
**Post date:** [March 26, 2020, 2:51am UTC](https://www.epiusers.help/t/bpm-method-directive-missing-data/65804/3 "2020-03-26T02:51:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Christian\_Pouchoulen](https://www.epiusers.help/user_avatar/www.epiusers.help/christian_pouchoulen/32/15397_2.png) [@Christian\_Pouchoulen](https://www.epiusers.help/u/Christian_Pouchoulen)\
**Post date:** [March 26, 2020, 3:17am UTC](https://www.epiusers.help/t/bpm-method-directive-missing-data/65804/4 "2020-03-26T03:17:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![LBARKER](https://www.epiusers.help/user_avatar/www.epiusers.help/lbarker/32/31072_2.png) [@LBARKER](https://www.epiusers.help/u/LBARKER)\
**Post date:** [March 26, 2020, 3:39am UTC](https://www.epiusers.help/t/bpm-method-directive-missing-data/65804/5 "2020-03-26T03:39:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Christian\_Pouchoulen](https://www.epiusers.help/user_avatar/www.epiusers.help/christian_pouchoulen/32/15397_2.png) [@Christian\_Pouchoulen](https://www.epiusers.help/u/Christian_Pouchoulen)\
**Post date:** [March 26, 2020, 3:42am UTC](https://www.epiusers.help/t/bpm-method-directive-missing-data/65804/6 "2020-03-26T03:42:17Z")

</div>

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 🙂

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

---

<div class="post-metadata">

**Author:** ![LBARKER](https://www.epiusers.help/user_avatar/www.epiusers.help/lbarker/32/31072_2.png) [@LBARKER](https://www.epiusers.help/u/LBARKER)\
**Post date:** [March 26, 2020, 4:15am UTC](https://www.epiusers.help/t/bpm-method-directive-missing-data/65804/7 "2020-03-26T04:15:32Z")

</div>

I found a very simple work around, all email addresses are fomatted [first.last@company.com](mailto:first.last@company.com), so I did this

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

 ![image](https://www.epiusers.help/uploads/default/original/3X/6/e/6e0ee2494f53ee70ff4d0a72c343b2cb286c69d6.png)

---

<div class="post-metadata">

**Author:** ![Christian\_Pouchoulen](https://www.epiusers.help/user_avatar/www.epiusers.help/christian_pouchoulen/32/15397_2.png) [@Christian\_Pouchoulen](https://www.epiusers.help/u/Christian_Pouchoulen)\
**Post date:** [March 26, 2020, 6:02am UTC](https://www.epiusers.help/t/bpm-method-directive-missing-data/65804/8 "2020-03-26T06:02:23Z")

</div>

Lol, I hope you never change the domain 🙂
