# BPM to change data in another table

**URL:** <https://www.epiusers.help/t/bpm-to-change-data-in-another-table/46713>\
**Category:** Epicor ERP 10\
**Created:** [August 7, 2018, 8:49pm UTC](https://www.epiusers.help/t/bpm-to-change-data-in-another-table/46713 "2018-08-07T20:49:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![tse.dba](https://www.epiusers.help/user_avatar/www.epiusers.help/tse.dba/32/8690_2.png) [@tse.dba](https://www.epiusers.help/u/tse.dba)\
**Post date:** [August 7, 2018, 8:49pm UTC](https://www.epiusers.help/t/bpm-to-change-data-in-another-table/46713/1 "2018-08-07T20:49:55Z")

</div>

I am writing a BPM in the Order Release table. But at the same time I need it to change data in the Part Detail table. How to I go about doing that? Thanks!

---

<div class="post-metadata">

**Author:** ![Jason\_Woods](https://www.epiusers.help/user_avatar/www.epiusers.help/jason_woods/32/80101_2.png) [@Jason\_Woods](https://www.epiusers.help/u/Jason_Woods)\
**Post date:** [August 7, 2018, 8:53pm UTC](https://www.epiusers.help/t/bpm-to-change-data-in-another-table/46713/2 "2018-08-07T20:53:07Z")

</div>

The best way is to use a BPM that performs the SalesOrder.MasterUpdate method. This will update the PartDtl table properly and keep them in sync. Otherwise, C# code is the only other way I know.

---

<div class="post-metadata">

**Author:** ![Chris\_Conn](https://www.epiusers.help/user_avatar/www.epiusers.help/chris_conn/32/93797_2.png) [@Chris\_Conn](https://www.epiusers.help/u/Chris_Conn)\
**Post date:** [August 8, 2018, 3:45am UTC](https://www.epiusers.help/t/bpm-to-change-data-in-another-table/46713/3 "2018-08-08T03:45:14Z")

</div>

figure out what your link is, i’ll write some pseudo code (since I dont know if it will compile lol)

```cs
foreach(var so in ttOrderRel.Where(o => o.Updated() || o.Added()))
{
 var myPart = Db.Part.Where(p => p.Company == o.Company && p.PartNum == o.PartNum).FirstOrDefault();
 
  if(myPart != null)
{
 //heres your part
}
 
}

```

---

<div class="post-metadata">

**Author:** ![tse.dba](https://www.epiusers.help/user_avatar/www.epiusers.help/tse.dba/32/8690_2.png) [@tse.dba](https://www.epiusers.help/u/tse.dba)\
**Post date:** [August 9, 2018, 5:36pm UTC](https://www.epiusers.help/t/bpm-to-change-data-in-another-table/46713/4 "2018-08-09T17:36:53Z")

</div>

In the SalesOrder.MasterUpdate method, it does not give me the option to set a field in PartDtl. Are there any documents that cover similar scenarios like this?

![image](https://epiusers.help/uploads/default/original/2X/a/aaeaea36898fa503bf3401130f191987c0c6deea.png)

![image](https://epiusers.help/uploads/default/original/2X/8/836e68a9f7a018f2917a86ac0c325b9c0a684ad6.jpg)

---

<div class="post-metadata">

**Author:** ![Mario.Cortes](https://www.epiusers.help/letter_avatar_proxy/v4/letter/m/eada6e/32.png) [@Mario.Cortes](https://www.epiusers.help/u/Mario.Cortes)\
**Post date:** [August 9, 2018, 5:43pm UTC](https://www.epiusers.help/t/bpm-to-change-data-in-another-table/46713/5 "2018-08-09T17:43:56Z")

</div>

Are you invoking the BO method?

---

<div class="post-metadata">

**Author:** ![tse.dba](https://www.epiusers.help/user_avatar/www.epiusers.help/tse.dba/32/8690_2.png) [@tse.dba](https://www.epiusers.help/u/tse.dba)\
**Post date:** [August 9, 2018, 5:44pm UTC](https://www.epiusers.help/t/bpm-to-change-data-in-another-table/46713/6 "2018-08-09T17:44:39Z")

</div>

I am not. Should i be?

---

<div class="post-metadata">

**Author:** ![Jason\_Woods](https://www.epiusers.help/user_avatar/www.epiusers.help/jason_woods/32/80101_2.png) [@Jason\_Woods](https://www.epiusers.help/u/Jason_Woods)\
**Post date:** [August 14, 2018, 11:26pm UTC](https://www.epiusers.help/t/bpm-to-change-data-in-another-table/46713/7 "2018-08-14T23:26:38Z")

</div>

Yes. That is how PartDtl will get updated.

---

<div class="post-metadata">

**Author:** ![tse.dba](https://www.epiusers.help/user_avatar/www.epiusers.help/tse.dba/32/8690_2.png) [@tse.dba](https://www.epiusers.help/u/tse.dba)\
**Post date:** [August 15, 2018, 4:59pm UTC](https://www.epiusers.help/t/bpm-to-change-data-in-another-table/46713/8 "2018-08-15T16:59:14Z")

</div>

I am sorry. I am at a loss. I have no idea how to accomplish this using the invoking BO method.

---

<div class="post-metadata">

**Author:** ![Jason\_Woods](https://www.epiusers.help/user_avatar/www.epiusers.help/jason_woods/32/80101_2.png) [@Jason\_Woods](https://www.epiusers.help/u/Jason_Woods)\
**Post date:** [August 17, 2018, 3:14am UTC](https://www.epiusers.help/t/bpm-to-change-data-in-another-table/46713/9 "2018-08-17T03:14:42Z")

</div>

The SalesOrder.Update Method (as well as MasterUpdate and UpdateExt) will update the PartDtl table properly.  
I wish that OrderRel has triggers that updated PartDtl, but alas…  
In 10.1.500+ (I believe), there is a widget that allows you to call a BO/Method.
