# Copy value of field to different table BPM

**URL:** <https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229>\
**Category:** Epicor ERP 10\
**Tags:** customization, bpm\
**Created:** [July 22, 2020, 4:02pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229 "2020-07-22T16:02:58Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dr\_dan](https://www.epiusers.help/user_avatar/www.epiusers.help/dr_dan/32/48005_2.png) [@dr\_dan](https://www.epiusers.help/u/dr_dan)\
**Post date:** [July 22, 2020, 4:02pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/1 "2020-07-22T16:02:58Z")

</div>

Hello!  
Looking for advice about UD fields and calling them in different tables.  
I created a few UD fields on my OrderRel table that allow us to put in customer truck information and expected date. We can’t start a job until their truck is in our possession. This information is almost always obtained during Order Entry.

I wanted this information also to be visible on the job that is linked to this order (we do everything make to order). I can’t see the OrderRel table in the EpiBindings - so I thought I’d make duplicate fields on the JobHead table. But now I can’t figure out how to keep the JobHead table in sync with the OrderRel table.

Should I be trying to sync two columns in two tables or can I somehow set up a field on the job to see the OrderRel field values? Thanks!

---

<div class="post-metadata">

**Author:** ![Asz0ka](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@Asz0ka](https://www.epiusers.help/u/Asz0ka)\
**Post date:** [July 22, 2020, 4:24pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/2 "2020-07-22T16:24:44Z")

</div>

You can use a the foreign key view wizard in a customization to bring in the OrderRel records linked to the job (assuming the job is make to order). I think this would be easier than creating another UD field and keeping it updated.

---

<div class="post-metadata">

**Author:** ![gpayne](https://www.epiusers.help/user_avatar/www.epiusers.help/gpayne/32/55751_2.png) [@gpayne](https://www.epiusers.help/u/gpayne)\
**Post date:** [July 22, 2020, 5:49pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/3 "2020-07-22T17:49:06Z")

</div>

@dr_dan I do this in a DD when a JobProd record is added or updated. On a MTO you have the order/line/release you need to get the data in the JobProd record.

---

<div class="post-metadata">

**Author:** ![dr\_dan](https://www.epiusers.help/user_avatar/www.epiusers.help/dr_dan/32/48005_2.png) [@dr\_dan](https://www.epiusers.help/u/dr_dan)\
**Post date:** [July 22, 2020, 5:59pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/4 "2020-07-22T17:59:25Z")

</div>

I was thinking along these lines, but I was hesitant to go that route because I didn’t want to assume that the information would be there at the time of jobprod add/update. If someone added it to the order after the job line was created, I still wanted it to be there when our planner is reviewing jobs to schedule - without necessarily having done an update yet. Maybe I’m thinking too much into it.

---

<div class="post-metadata">

**Author:** ![dr\_dan](https://www.epiusers.help/user_avatar/www.epiusers.help/dr_dan/32/48005_2.png) [@dr\_dan](https://www.epiusers.help/u/dr_dan)\
**Post date:** [July 22, 2020, 6:02pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/5 "2020-07-22T18:02:56Z")

</div>

I am in the Customization tools dialog. I don’t see a foreign key view wizard. It sounds like what I am trying to accomplish. Could you elaborate a little? I’m learning so many new things lately!

---

<div class="post-metadata">

**Author:** ![Asz0ka](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@Asz0ka](https://www.epiusers.help/u/Asz0ka)\
**Post date:** [July 22, 2020, 6:08pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/6 "2020-07-22T18:08:32Z")

</div>

![image](https://www.epiusers.help/uploads/default/original/3X/b/d/bd0d19b1a94e38c808a7b0690d5c147d58367acb.png)

You can bring in other data tables into your customization with it. I had issues with using the order line and order rel fields as foreign keys to link with the OrderRel table, so the data directive may be a better solution.

---

<div class="post-metadata">

**Author:** ![gpayne](https://www.epiusers.help/user_avatar/www.epiusers.help/gpayne/32/55751_2.png) [@gpayne](https://www.epiusers.help/u/gpayne)\
**Post date:** [July 22, 2020, 6:11pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/7 "2020-07-22T18:11:03Z")

</div>

@dr_dan Yes, that would require a method directive on Order Release for those fields changing that checked for an existing jobprod to update, but that is not hard to do.

---

<div class="post-metadata">

**Author:** ![dr\_dan](https://www.epiusers.help/user_avatar/www.epiusers.help/dr_dan/32/48005_2.png) [@dr\_dan](https://www.epiusers.help/u/dr_dan)\
**Post date:** [July 22, 2020, 6:23pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/8 "2020-07-22T18:23:39Z")

</div>

I was coming to the same conclusion as to where I needed to originate the BPM. However, I am stuck here because I don’t know how to update a field in a different table. When I look to set fields, I only get tables within the Sales Order family. Do I need to do that through execute custom code? If so, what is the magic format that allows me to update a table?

---

<div class="post-metadata">

**Author:** ![Asz0ka](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/a698b9/32.png) [@Asz0ka](https://www.epiusers.help/u/Asz0ka)\
**Post date:** [July 22, 2020, 6:48pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/9 "2020-07-22T18:48:29Z")

</div>

If you use a method directive, you can use the BO widget to call JobEntry.Update or UpdateExt. If you use a data directive, you would need custom code since that widget won’t be available. The code would use some BO adapter to update the tables.

---

<div class="post-metadata">

**Author:** ![gpayne](https://www.epiusers.help/user_avatar/www.epiusers.help/gpayne/32/55751_2.png) [@gpayne](https://www.epiusers.help/u/gpayne)\
**Post date:** [July 22, 2020, 6:55pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/10 "2020-07-22T18:55:26Z")

</div>

If they always have the information you could have a bpm make those fields required. Then you would only need the MD if there was a change or maybe not at all.

---

<div class="post-metadata">

**Author:** ![gpayne](https://www.epiusers.help/user_avatar/www.epiusers.help/gpayne/32/55751_2.png) [@gpayne](https://www.epiusers.help/u/gpayne)\
**Post date:** [July 22, 2020, 6:58pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/11 "2020-07-22T18:58:11Z")

</div>

As @Asz0ka says you can use the BO widget. When I am working with UD fields I have a habit of just dropping to code, but I should learn how to use the widgets more so I will try to do this in widgets.

---

<div class="post-metadata">

**Author:** ![Joseph\_Martin](https://www.epiusers.help/user_avatar/www.epiusers.help/joseph_martin/32/16359_2.png) [@Joseph\_Martin](https://www.epiusers.help/u/Joseph_Martin)\
**Post date:** [July 22, 2020, 7:56pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/12 "2020-07-22T19:56:21Z")

</div>

This can be done with a Foreign Key View, you just have to create 2 FKVs.  
First one is a parent of JobProd, linked to order num, type of Foreign Key View. Select OrderNum for the Like Column.  
The second is a sub table view, with a parent of the view created above.  
In the subtable view you add 3 Parent / Child View Columns, OrderNum -\> OrderNum, OrderLine -\> OrderLine, OrderRelNum -\> OrderRelNum.

You can keep your data in one spot, reference it any where else and not have to worry about BPMs to sync.

---

<div class="post-metadata">

**Author:** ![dr\_dan](https://www.epiusers.help/user_avatar/www.epiusers.help/dr_dan/32/48005_2.png) [@dr\_dan](https://www.epiusers.help/u/dr_dan)\
**Post date:** [August 3, 2020, 6:19pm UTC](https://www.epiusers.help/t/copy-value-of-field-to-different-table-bpm/69229/13 "2020-08-03T18:19:52Z")

</div>

Joseph, I ended up using your solution. It did exactly what I was trying to do.

Thanks!
