# Stop shipment if field is true

**URL:** <https://www.epiusers.help/t/stop-shipment-if-field-is-true/51732>\
**Category:** Epicor ERP 9\
**Tags:** epicor\
**Created:** [January 23, 2019, 10:50am UTC](https://www.epiusers.help/t/stop-shipment-if-field-is-true/51732 "2019-01-23T10:50:42Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![A.Baeisa](https://www.epiusers.help/user_avatar/www.epiusers.help/a.baeisa/32/8988_2.png) [@A.Baeisa](https://www.epiusers.help/u/A.Baeisa)\
**Post date:** [January 31, 2019, 2:37pm UTC](https://www.epiusers.help/t/stop-shipment-if-field-is-true/51732/21 "2019-01-31T14:37:18Z")

</div>

just remembered that you are running E9 i.e. ABL, mine in C#, can you convert ?

---

<div class="post-metadata">

**Author:** ![Rowley150](https://www.epiusers.help/user_avatar/www.epiusers.help/rowley150/32/15051_2.png) [@Rowley150](https://www.epiusers.help/u/Rowley150)\
**Post date:** [January 31, 2019, 2:38pm UTC](https://www.epiusers.help/t/stop-shipment-if-field-is-true/51732/22 "2019-01-31T14:38:53Z")

</div>

with some difficulty,…yes!..ABL is not the easiest syntax!  
we have a few bpm’s that use ABL so i might be able to mould it together

i wonder if there is some software that automatically converts it

---

<div class="post-metadata">

**Author:** ![A.Baeisa](https://www.epiusers.help/user_avatar/www.epiusers.help/a.baeisa/32/8988_2.png) [@A.Baeisa](https://www.epiusers.help/u/A.Baeisa)\
**Post date:** [January 31, 2019, 2:41pm UTC](https://www.epiusers.help/t/stop-shipment-if-field-is-true/51732/23 "2019-01-31T14:41:27Z")

</div>

here you are mate, the highlghted code line is my UD field:

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

the code as text if that helps:

var ttShipHead\_xRow = (from ttShipHead\_Row in ttShipHead  
where ttShipHead\_Row.Company == Session.CompanyID  
&& (ttShipHead\_Row.Updated()||ttShipHead\_Row.Added())  
select ttShipHead\_Row).FirstOrDefault();

if (ttShipHead\_xRow != null)  
{  
foreach (var ShipDtl\_iterator in (from ShipDtl\_Row in Db.ShipDtl  
where ShipDtl\_Row.Company == ttShipHead\_xRow.Company  
&& ShipDtl\_Row.PackNum == ttShipHead\_xRow.PackNum  
select ShipDtl\_Row).ToList())

```
	if (ShipDtl_iterator != null)
	{
	foreach (var PartLot_iterator in (from PartLot_Row in Db.PartLot
	where PartLot_Row.Company == ShipDtl_iterator.Company
	&& PartLot_Row.PartNum == ShipDtl_iterator.PartNum
	&& PartLot_Row.LotNum == ShipDtl_iterator.LotNum
	select PartLot_Row).ToList())
		
		if (PartLot_iterator != null && Convert.ToBoolean(PartLot_iterator["LotOnHold_c"])==true)
		{
		CallContext.Current.ExceptionManager.AddBLException("Lot No.: "+PartLot_iterator.LotNum+" of Pack Line: "+ShipDtl_iterator.PackLine +" is on Hold Due To: "+PartLot_iterator["HoldReason_c"]+" See: "+PartLot_iterator["HoldUserID_c"]);
		}
	}	

```

}

---

<div class="post-metadata">

**Author:** ![Rowley150](https://www.epiusers.help/user_avatar/www.epiusers.help/rowley150/32/15051_2.png) [@Rowley150](https://www.epiusers.help/u/Rowley150)\
**Post date:** [January 31, 2019, 2:42pm UTC](https://www.epiusers.help/t/stop-shipment-if-field-is-true/51732/24 "2019-01-31T14:42:14Z")

</div>

thank you, i appreciate it.

---

<div class="post-metadata">

**Author:** ![A.Baeisa](https://www.epiusers.help/user_avatar/www.epiusers.help/a.baeisa/32/8988_2.png) [@A.Baeisa](https://www.epiusers.help/u/A.Baeisa)\
**Post date:** [January 31, 2019, 2:55pm UTC](https://www.epiusers.help/t/stop-shipment-if-field-is-true/51732/25 "2019-01-31T14:55:37Z")

</div>

may be there is, i do not know, but i found this presentation, it is exist as PDF, i suggest to download it and go quickly through it, you will find what i used in my C# straight away

> **[ABL to C# BPM Conversion - ppt video online download](https://slideplayer.com/slide/5262987/)**
>
> Topics 3 ABL to C# conversion exercises Common Errors Common Progress Commands Questions

[dokumen.tips\_ahmed-hamidi-lead-software-architect-abl-to-c-bpm-conversion.pptx](https://www.epiusers.help/uploads/default/original/2X/1/10de78cf3c4f2e7e3b693c5ab1117aac47e6ea65.pptx) (862.7 KB)

---

<div class="post-metadata">

**Author:** ![Rowley150](https://www.epiusers.help/user_avatar/www.epiusers.help/rowley150/32/15051_2.png) [@Rowley150](https://www.epiusers.help/u/Rowley150)\
**Post date:** [January 31, 2019, 4:17pm UTC](https://www.epiusers.help/t/stop-shipment-if-field-is-true/51732/26 "2019-01-31T16:17:06Z")

</div>

nailed it this time…  
thank you for your help but i was able to avoid the code!

 ![image](https://epiusers.help/uploads/default/original/2X/3/3f2727241ded7ba7080b4fca2e1ae58196fa9b44.jpeg)

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

[Previous page](https://www.epiusers.help/t/stop-shipment-if-field-is-true/51732.md?page=1)
