# Update Table Field using Script Editor in Customization

**URL:** <https://www.epiusers.help/t/update-table-field-using-script-editor-in-customization/73794>\
**Category:** Epicor ERP 10\
**Tags:** customization, e10, bpm\
**Created:** [December 17, 2020, 5:12pm UTC](https://www.epiusers.help/t/update-table-field-using-script-editor-in-customization/73794 "2020-12-17T17:12:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lfheredia](https://www.epiusers.help/letter_avatar_proxy/v4/letter/l/a4c791/32.png) [@lfheredia](https://www.epiusers.help/u/lfheredia)\
**Post date:** [December 17, 2020, 5:12pm UTC](https://www.epiusers.help/t/update-table-field-using-script-editor-in-customization/73794/1 "2020-12-17T17:12:16Z")

</div>

Hello,  
I’ve been sucessfully using the following BPM inside an UBAQ to update a User Field (Checkbox01) in the PartSug table. Basically the user checks the box in the Dashboard and after saving it writes directly to the Table.

Instead of using an UBAQ BPM, is there a way to code this inside Script Editor in the Dashboard’s Customization? Is there a way to translate this BPM to Script Editor?

I’ve used BOConnect in the past, but cannot find a BO that updates the PartSug table.

Thanks

```cs
using (System.Transactions.TransactionScope transactionScope = IceDataContext.CreateDefaultTransactionScope())
{
  
    var ttResultQuery = ttResults
        .Where(row => !string.IsNullOrEmpty(row.RowMod) && row.RowMod != "P");

    foreach (var ttResult in ttResultQuery)
    {
      
     var dsPartSug = (from tt in Db.PartSug where 
     tt.Company == ttResult.PartSug_Company &&
     tt.TargetJobNum == ttResult.PartSug_TargetJobNum &&
     tt.TargetAssemblySeq == ttResult.PartSug_TargetAssemblySeq &&
     tt.TargetMtlSeq == ttResult.PartSug_TargetMtlSeq &&
     tt.Classifier == ttResult.PartSug_Classifier &&
     tt.OrderNum == ttResult.PartSug_OrderNum &&
     tt.OrderLine == ttResult.PartSug_OrderLine &&
     tt.OrderRelNum == ttResult.PartSug_OrderRelNum &&
     tt.WarehouseCode == ttResult.PartSug_WarehouseCode &&
     tt.PartNum == ttResult.PartSug_PartNum &&
     tt.DueDate == ttResult.PartSug_DueDate &&
     tt.JobNum == ttResult.PartSug_JobNum &&
     tt.AssemblySeq == ttResult.PartSug_AssemblySeq &&
     tt.JobSeq == ttResult.PartSug_JobSeq &&
     tt.SugNum == ttResult.PartSug_SugNum select tt).FirstOrDefault();
    
     if (dsPartSug != null)
    {
      dsPartSug.CheckBox01 = ttResult.PartSug_CheckBox01;
    }
     
     }   
     
     this.Db.Validate();
     transactionScope.Complete();
}
```

---

<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:** [December 18, 2020, 6:52am UTC](https://www.epiusers.help/t/update-table-field-using-script-editor-in-customization/73794/2 "2020-12-18T06:52:50Z")

</div>

All the ways I can think of still come back to a BPM of some kind (or Function).
