cancel
Showing results for 
Search instead for 
Did you mean: 

Problem opening a UDO via a LinkButton

Former Member
0 Kudos

Hello all,

I need to open the form of a user-defined object upon a click on a LinkButton. To do this, I Activate() the corresponding menu, then Activate() the Find menu, enter the document number into the appropriate EditText and press the "Find" button.

The problem is that when entering the "Add" mode, the UDO performs initialization of some fields, so that if one tries to enter the "Find" mode, the following system message appears in a modal window and stops the execution of the code:

"Changes will cause the data to be deleted. Continue?"

Is there a way to temporarily disable this message to enable the addon to open the UDO form without any interference from the user?

Thanks in advance,

Anton

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Expect you know if on the UDO form is some initialization of fields and if the message will pops up.

If you have form with this message, you may after activating 1281 menuitem (find) send enter key with sendkeys and the message will be confirmed.

Former Member
0 Kudos

Hello, Petr, and thank you for the reply.

Unfortunately, that message window is modal and the call to Activate() does not return until the user presses "OK"... The only way I see is by spawning a new thread and doing SendKyes() from there, but this is overkill.

Anton

Former Member
0 Kudos

Anton,

new thread is one possibility, but the messsage box is not win message box, but SAP form, so I think you can clcik there without new thread too.

Check this thread, hope it helps

Former Member
0 Kudos

Ah, thank.

Didn't think I could catch an event on that form.

Anton