• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

F4801 Table Trigger


Active Member
Hello List

I am trying to create a trigger on the F4801, Basically just to send an email containing the doc number, doc type and some other fields. I have noticed that the TK values are not being populated, only the Doco and whichever field was updated. Is there any way I can get the other TK values populated? I found a similar call which appeared to haved a fix but it referred to web client. I need to roll this out on thick client.

Thanks in advance for any help.


8.10 apps


Legendary Poster

JDE Table Triggers or TERs - Table Event Rules - behave quite differently from Database Table Triggers. To begin with - they're flaky as hell.

If you're unable to set this up as a database table trigger, then try this in your TER (I assume it is the After Update Event?):

1. First copy DOCO value from the TK field into a local variable of same type.
2. Do a Fetch Single on F4801 (using the ER variable DOCO) and retrieve the field values needed into the corresponding TK fields.
3. Now you should have the values needed to send in your email.

As you discovered TK fields only show what was in the table buffer from whatever set of code that triggered the event. In some cases (Item Branch - P41026 - Delete of a F4102 entry comes to mind) not even the key field values are populated in the TK fields. So, if at all possible use a database trigger instead.



Active Member
Thankyou for your reply, we did have the fetch single idea in place but for some reason it didnt work. I had thought it was because you cant do a fetch on the row you are updating dur to locking or something. But it turns out it just didnt like the TK being passed in, as soon as I copied it to a variable as per your suggestion it worked fine.

Many thanks again.