Skip to Content

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

how to close AddOn form after adding a record

Hello

I am implementing a AddOn that has its own form operating on User-Defined-Object.

Please tell me how can I force form to close after record is added/inserted.

I was trying to override FORM_DATA_ADD Event (after event) but neither form.Close() nor form.Items.Item("2").Click() (simulation of cancel buton) didn't work for me or caused unexpected close of SAP B1

Regards,

Pawel

replied

Hi Pawel,

Form_Data_Add (after) event occurs before the Item_Pressed (after) event. B1 needs the form that initially triggered the Item_Pressed open (perhaps this is why you get the errors).

You could catch the Item_Pressed (after) event on the add button (id = 1) and the use the simple form.Close();

By that time no other (native) events should be triggered and the form.Close() should be successful.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

0 View this answer in context

Helpful Answer

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