Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Record change event

Dear SAP B1 SDK experts,

I am writing an Add-on for SAP B1 8.81 in C#.

I am trying to catch an event when the user navigates from one record to another in a Sales Order form.

Let's assume that I have two Sales Orders, numbers 10000001 and 10000002.

Let's assume that I am positioned in the record 10000001.

When I click the 'NEXT' button, the form loads to the 10000002.

The event has to be implemented in such a way that I retrieve the next record, that is, the 10000002.

All the implementations I tried only retrieves the information of the currently loaded record, not the next record. For example, the event et_VALIDATE is triggered when changing the record, but it is only aware of the 10000001. Other events such as et_CLICK (an the rest related to mouse clicks) are triggered quite often, not necessarily when the form jumps to the next record, so I am not sure whether the record has changed or not.

Other events related with forms seem to be of no use for that particular requirement.

I can implement a workaround for this, but seems to be quite hacky. For example, I can implement a method to be called  for each et_ALL_EVENTS, and to save the ID of the current record in an array, so I can compare whether the ID changed and thus to detect the change. The array may be quite complex because many instances of the form can be opened at the same time, and I also have to do a similar thing for Purchase Order forms.

I always try to avoid these kind of solutions. I wonder if anyone knows a simpler and more elegant way to resolve the issue.

Hope that makes sense.

Best regards.

N

Tags:
Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question