# UBAQ Custom Delete not working

**URL:** <https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088>\
**Category:** Epicor ERP 10\
**Tags:** e10\
**Created:** [May 23, 2019, 9:59pm UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088 "2019-05-23T21:59:34Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomdomurat](https://www.epiusers.help/user_avatar/www.epiusers.help/tomdomurat/32/41633_2.png) [@tomdomurat](https://www.epiusers.help/u/tomdomurat)\
**Post date:** [May 23, 2019, 9:59pm UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/1 "2019-05-23T21:59:34Z")

</div>

I need the ability to delete a row in a child UD table (UD100A).  
There is no DeleteByID BO on the UD100A table so I cannot “Invoke BO Method”.  
I defined the CustomAction as “Base-Processing” BPM and called it “DeleteRow”.  
The code compiles and runs without error, just that it does not actually delete the record.

Can anyone offer a suggestion as to why this is not deleting?:

```auto
using (var txScope = IceContext.CreateDefaultTransactionScope())
{

  foreach(var UD100A in (from row in Db.UD100A.With(LockHint.UpdLock) where
                              row.Company == Session.CompanyID &&
                              row.CheckBox01 == true
                              select row))
            {
                Db.UD100A.Delete(UD100A);
            }
     Db.Validate();
     txScope.Complete();
}

```

 ![CustomAction_UD100A_DeleteRow](https://epiusers.help/uploads/default/original/3X/d/a/da9f0e8fa93759967da60be516ec9562e49add6a.png)

---

<div class="post-metadata">

**Author:** ![hkeric.wci](https://www.epiusers.help/user_avatar/www.epiusers.help/hkeric.wci/32/52019_2.png) [@hkeric.wci](https://www.epiusers.help/u/hkeric.wci)\
**Post date:** [May 24, 2019, 12:21am UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/2 "2019-05-24T00:21:25Z")

</div>

Yes, before the **Db.UD100A.Delete(UD100A);** line you need .to set the RowMod also to “D”

Example:

```cs
UD100A.RowMod = IceRow.ROWSTATE_DELETED;
Db.UD100A.Delete(UD100A);

```

---

<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:** [May 24, 2019, 12:47am UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/3 "2019-05-24T00:47:39Z")

</div>

Please do yourself a favor and use the BO

---

<div class="post-metadata">

**Author:** ![tomdomurat](https://www.epiusers.help/user_avatar/www.epiusers.help/tomdomurat/32/41633_2.png) [@tomdomurat](https://www.epiusers.help/u/tomdomurat)\
**Post date:** [May 24, 2019, 12:44pm UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/4 "2019-05-24T12:44:46Z")

</div>

> [@hkeric.wci](#):
>
> UD100A.RowMod = IceRow.ROWSTATE\_DELETED

No go. It does not like this line of code.  
I would prefer to use the BO, but nothing displays for UD100A. There is a UD100 DeleteByID, but I want to delete the child table records UD100A and not sure how I get that method syntax.

Rather than a CustomAction, should I instead put this in the UD100A.Update BPM ?

 ![UBAQ_Delete_Error](https://www.epiusers.help/uploads/default/original/3X/2/e/2e1f90d217f28c312858e0baddd6f7916532a395.png)

---

<div class="post-metadata">

**Author:** ![danbedwards](https://www.epiusers.help/letter_avatar_proxy/v4/letter/d/9f8e36/32.png) [@danbedwards](https://www.epiusers.help/u/danbedwards)\
**Post date:** [May 24, 2019, 12:48pm UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/5 "2019-05-24T12:48:56Z")

</div>

Yes - Use the BO update and set the child record to deleted.

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [May 24, 2019, 1:25pm UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/6 "2019-05-24T13:25:25Z")

</div>

Check out this thread.

> **[Delete Rows UD Table](https://www.epiusers.help/t/delete-rows-ud-table/52534)**
>
> I know there are enough posts about this on here but I’m experiencing an odd issue that I think is easily solvable but I’m just missing something. I’m trying to delete rows from a UD table. Using the settings in the images below, and the code...

---

<div class="post-metadata">

**Author:** ![tomdomurat](https://www.epiusers.help/user_avatar/www.epiusers.help/tomdomurat/32/41633_2.png) [@tomdomurat](https://www.epiusers.help/u/tomdomurat)\
**Post date:** [May 24, 2019, 1:25pm UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/7 "2019-05-24T13:25:41Z")

</div>

Thanks Dan, putting the “Delete” code in the BO UD100A Update \>\> BaseProcessing works.

Is there a way to refresh the UBAQ after Update without calling the GetList? If that is how it works, that’s fine.

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [May 24, 2019, 1:35pm UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/8 "2019-05-24T13:35:35Z")

</div>

Fwiw, doing a trace of a child delete from the UD provided screens, they use update with a row mod to remove the row.

> **Trace of child delete**
>
> Ice.Proxy.BO.UD109Impl Update net.tcp://e10-2/ERP102Pilot/ System.Void 5/24/2019 08:32:36:4375199 AM 1 0 RAPAT test test test test test 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 false false false false false false false false false false false false false false false false false false false false false false 359702876 0f312e4c-c49c-4972-8f1a-6696f6169810 0 00000000-0000-0000-0000-000000000000 Ice.Proxy.BO.UD109Impl GetByID net.tcp://e10-2/ERP102Pilot/ Ice.Tablesets.UD109Tableset 5/24/2019 08:32:36:5924679 AM 1 0 00000000-0000-0000-0000-000000000000

---

<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:** [May 24, 2019, 2:23pm UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/9 "2019-05-24T14:23:54Z")

</div>

You should not over over-writing the Base processing… (ever… there’s pretty much no good reason)  
Replicate what @Banderson sugested via the BO

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [May 24, 2019, 2:25pm UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/10 "2019-05-24T14:25:28Z")

</div>

@josecgomez He’s in a UBAQ, there is no base processing for delete.

---

<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:** [May 24, 2019, 2:26pm UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/11 "2019-05-24T14:26:10Z")

</div>

No he put the code (as far as I can tell) in the UD100 Update base Processing. (that’s how I read it)

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [May 24, 2019, 2:26pm UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/12 "2019-05-24T14:26:51Z")

</div>

Ah, yeah. Don’t do that…

---

<div class="post-metadata">

**Author:** ![tomdomurat](https://www.epiusers.help/user_avatar/www.epiusers.help/tomdomurat/32/41633_2.png) [@tomdomurat](https://www.epiusers.help/u/tomdomurat)\
**Post date:** [May 24, 2019, 2:42pm UTC](https://www.epiusers.help/t/ubaq-custom-delete-not-working/56088/13 "2019-05-24T14:42:52Z")

</div>

No, I did not modify the ##BASE## processing Directive.  
I created a new Directive with the original code I posted and the functionality is working as I would expect.

 ![BaseProessing-DeleteRow](https://epiusers.help/uploads/default/original/3X/b/8/b812a77db5c05f0c74abe9c9796dc0d235a84681.png)
