# Set UD field in Order Entry to equal another UD field

**URL:** <https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049>\
**Category:** Epicor ERP 10\
**Tags:** customization, bpm\
**Created:** [February 27, 2018, 9:23pm UTC](https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049 "2018-02-27T21:23:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![billyx](https://www.epiusers.help/letter_avatar_proxy/v4/letter/b/278dde/32.png) [@billyx](https://www.epiusers.help/u/billyx)\
**Post date:** [February 27, 2018, 9:23pm UTC](https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049/1 "2018-02-27T21:23:33Z")

</div>

Hello,

I have a task to set a UD field in Order Entry (OrderDtl.SubGroup\_c) to equal (Part.ShortChar01).

Once a Part is selected at the line level I need the text that populates in Part.ShortChar01 to copy over to OrderDtl.SubGroup\_c.

What method would be recommended for this? BPM vs Customization? How would I get started?

And does anyone have an example they are willing to share?

Thanks in advance.

Billy

 ![Set%20Fields%20Order%20Entry](https://epiusers.help/uploads/default/original/2X/9/9c53bd957419ca917c7c7f808e424d49fa808efa.jpg)

---

<div class="post-metadata">

**Author:** ![tkoch](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tkoch](https://www.epiusers.help/u/tkoch)\
**Post date:** [February 27, 2018, 9:24pm UTC](https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049/2 "2018-02-27T21:24:59Z")

</div>

Easiest way that involves no coding would be a Foreign Key View. I believe there is an example in the ICE Users Guide available on EpicWeb.

---

<div class="post-metadata">

**Author:** ![josecgomez](https://www.epiusers.help/user_avatar/www.epiusers.help/josecgomez/32/55731_2.png) [@josecgomez](https://www.epiusers.help/u/josecgomez)\
**Post date:** [February 27, 2018, 9:34pm UTC](https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049/3 "2018-02-27T21:34:30Z")

</div>

Post Processing BPM on ChangePartNumMaster Method should be pretty straight forward.

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

The expression is

```cs
(from x in Db.Part where x.Company == ttOrderDtlRow.Company && x.PartNum == ttOrderDtlRow.PartNum select x.ShortChar01).DefaultIfEmpty("").FirstOrDefault()

```

Change the fields to meet your needs. Right now it returns ShortChar01 from Part and assigns it to ShortChar01 on the OrderDtl.

---

<div class="post-metadata">

**Author:** ![Hogardy](https://www.epiusers.help/user_avatar/www.epiusers.help/hogardy/32/18785_2.png) [@Hogardy](https://www.epiusers.help/u/Hogardy)\
**Post date:** [February 27, 2018, 9:41pm UTC](https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049/4 "2018-02-27T21:41:01Z")

</div>

It all depends when you want this to happen… If it is as soon as selected, then I second Theodore suggestion, Otherwise I use the BPM…

Pierre

---

<div class="post-metadata">

**Author:** ![billyx](https://www.epiusers.help/letter_avatar_proxy/v4/letter/b/278dde/32.png) [@billyx](https://www.epiusers.help/u/billyx)\
**Post date:** [February 28, 2018, 8:30pm UTC](https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049/5 "2018-02-28T20:30:55Z")

</div>

Thanks for the quick feedback. One thing I forgot to mention is that the users want the flexibility to modify the text field that’s being copied over. I’ve tried the Foreign Key View, but the fields are defaulted to DataReadOnly “True” with no options to change to false.

 ![Foreign%20Key%20View](https://epiusers.help/uploads/default/original/2X/1/168fd455ccf67bb109b0e345879c7e62184c34d5.JPG)

---

<div class="post-metadata">

**Author:** ![billyx](https://www.epiusers.help/letter_avatar_proxy/v4/letter/b/278dde/32.png) [@billyx](https://www.epiusers.help/u/billyx)\
**Post date:** [February 28, 2018, 8:40pm UTC](https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049/6 "2018-02-28T20:40:00Z")

</div>

Jose,

I wasn’t able to locate ChangePartNumMaster method in Part, but there was a ChangePartNum. I’m not sure if that’s what you’re referring to, but I went ahead with that method, the problem is it doesn’t have an option to set the ttOrderDtl table.

 ![BPM%20Part](https://epiusers.help/uploads/default/original/2X/6/6186a054d29c7b49b3ec9cbc18a05e0d617b56c6.JPG)

 ![BPM%20Part2](https://epiusers.help/uploads/default/original/2X/9/97008301d5350baa0059996d740b526909b97655.JPG)

---

<div class="post-metadata">

**Author:** ![tkoch](https://www.epiusers.help/letter_avatar_proxy/v4/letter/t/439d5e/32.png) [@tkoch](https://www.epiusers.help/u/tkoch)\
**Post date:** [February 28, 2018, 8:47pm UTC](https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049/7 "2018-02-28T20:47:15Z")

</div>

You are referencing the wrong Business Object, you should use SalesOrder.ChangePartNumMaster

---

<div class="post-metadata">

**Author:** ![billyx](https://www.epiusers.help/letter_avatar_proxy/v4/letter/b/278dde/32.png) [@billyx](https://www.epiusers.help/u/billyx)\
**Post date:** [February 28, 2018, 8:54pm UTC](https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049/8 "2018-02-28T20:54:47Z")

</div>

My mistake.

Thanks Theodore!

---

<div class="post-metadata">

**Author:** ![billyx](https://www.epiusers.help/letter_avatar_proxy/v4/letter/b/278dde/32.png) [@billyx](https://www.epiusers.help/u/billyx)\
**Post date:** [March 2, 2018, 3:42pm UTC](https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049/9 "2018-03-02T15:42:35Z")

</div>

Hey Jose,

This may be a simple brain fart from my end, but using your code, I keep running into the error below.

System.Drawing.Bitmap CS1061 ‘Part’ does not contain a definition for ‘ShortChar01’ and no extension method ‘ShortChar01’ accepting a first argument of type ‘Part’ could be found (are you missing a using directive or an assembly reference?)

 ![BPM%20Part3](https://epiusers.help/uploads/default/original/2X/4/460b710168a9405bf928ac7d5bbdc1f5564ac523.JPG)

---

<div class="post-metadata">

**Author:** ![josecgomez](https://www.epiusers.help/user_avatar/www.epiusers.help/josecgomez/32/55731_2.png) [@josecgomez](https://www.epiusers.help/u/josecgomez)\
**Post date:** [March 2, 2018, 3:43pm UTC](https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049/10 "2018-03-02T15:43:54Z")

</div>

Try lowercase Shortchar01 it is case sensitive… it should auto complete for you if you hit Alt Space

---

<div class="post-metadata">

**Author:** ![DaveB10](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/bcef8e/32.png) [@DaveB10](https://www.epiusers.help/u/DaveB10)\
**Post date:** [May 29, 2018, 5:32pm UTC](https://www.epiusers.help/t/set-ud-field-in-order-entry-to-equal-another-ud-field/43049/11 "2018-05-29T17:32:07Z")

</div>

I am having the same error and I tried with no success:

(from x in Db.Part where x.Company == ttOrderDtlRow.Company && x.PartNum == ttOrderDtlRow.PartNum select x.ShortChar01).DefaultIfEmpty("").FirstOrDefault()

&

(from x in Db.Part where x.Company == ttOrderDtlRow.Company && x.PartNum == ttOrderDtlRow.PartNum select x.Shortchar01).DefaultIfEmpty("").FirstOrDefault()
