DMRHead Custom Fields – Application Studio

I have added two new custom fields to DMRHead:

  • LastUpdateBy_c – stores the current user ID
  • LastUpdateOn_c – stores the current date

Both fields are also available in the DMRHead view.

The controls are configured as read-only:

  • TextBox Binding: DMRHead.LastUpdateBy_c
  • Date Picker Binding: DMRHead.LastUpdateOn_c

I created the following Application Studio event configuration:

Event: UD_SetValues

  • Type: Event
  • Hook: After
  • Target: AfterGetByID

Additional events:

  • Type: Event, Hook: After, Target: GetByID_OnSuccess
  • Type: DataView, Hook: View Changed, Target: DMRNum
  • Type: DataTable, Hook: Column Changed, Target: DMRHead, Column: DMRNum

For the row-update action, I configured:

  1. Column 1: Erp Binding : DMRHead.LastUpdateBy_c value : “{Constant.CurrentUserID}”
  2. Column 2: Erp Binding : DMRHead.LastUpdateOn_c value : “{Constant.Today}”

The constants are resolving correctly (for example, user ID Devuser and date 2026-09-01), but the values are not appearing in the read-only controls.

The values are not displayed in the controls and are also not being saved to the database table. Please advise me on how to resolve this issue.

@dcamlin @tom_osborne @knash @klincecum @Randy @Hally

What is DevTools telling you?

Not understand your question?

In Epicor Kinetic Application Studio, the values are not displayed in the bound controls and are not being persisted to the database

I don’t know what all of your events are doing, you listed several. You’re trying to set values to those fields… and you’re saying they’re not being saved to the database. Are you ever running an update event? That’s what will save the values.

I’m assuming your values may be getting set initially, but then might be getting overwritten.

I would try your event with a trigger of Event > BEFORE > Update. This will set your values right before you send the update call. That should save them to the server table (hopefully).

Is there a reason you arent using a BPM to set the values? A Data Directive would work just fine.

100%

Agree DD work great and then you know the business logic coveres other actions that updates the record, like DMT!!!

var ttRow = (from ttrow in ttDMRHead where ttrow.Company == this.CompanyID  select ttrow).FirstOrDefault();

if(ttRow != null)
{
   ttRow.LastUpdateBy_c= Session.UserID;
   ttRow.LastUpdateOn_c=  DateTime.Today;
}

Done and working perfect.

Thanks Everyone.

Glad you got it all sorted.

Don’t forget to mark a post a solution to help other in the future.

The only thing I would change for anyone SaaS is instead of DateTime.Today use:

Ice.Lib.CompanyTime.Today(CompanyID);
Ice.Lib.CompanyTime.Today(); // CurrentCompany Defaulted
Ice.Lib.CompanyTime.Now(CompanyID);
Ice.Lib.CompanyTime.Now(); // CurrentCompany Defaulted

That gets the Company time and not the Server time, howver if you use DateTime.Today it may only be noticable at like 11pm when the server may already be on 1am.