Skip to Content
author's profile photo
Former Member

Creating SO requiring approval from code(UIAPI)

Hi,

I am creating a SO from code using UIAPI as follows.

-First activate SO menu

-Fill up the SO details

-Click on the Add button

This SO is supposed to go for Approval, so a form to confirm sending the document for autorization open up.

I want to be able to enter some remarks in the Remarks field using code and also click the OK button using code.

How can i do it? Rirht now when i click on the Add button in SO form using code, the execution of the code stops at the autorization confirmation form and i cannot do anything but wait for a user to manually click on the OK button.

Any suggestions?

Thanks

Satish.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    author's profile photo
    Former Member
    Oct 04, 2005 at 03:22 PM

    Hi, I think this falls in the same department as getting rid of unwanted forms/dialogs.

    One alternative is to fill keyboard buffer with characters that will (hopefully) go to the right form/dialog and invoke desired action.

    Something like this

    SendKeys (" ") ' send neutral keystrokes in order to wait for the SBO frm/dialog

    'hope that the frm/dialog will be ready to process the command that comes with the next SendKeys

    SendKeys ("Your command as a keystroke sequence")

    itm.Click ' The line that invokes something you can't access otherwise.

    Search for 'sendkeys' in this forum for more information on this option.

    You could also use UIAPI to hook the formload event of Approval form and do whatever you want with the form. If you want to differentiate the behavior by the trigger of the Approval form, then hook your action that triggers the form and store some kind of uid in a global variable. Then in the formload event check if the uid value requires your action.

    HTH

    Juha

    Add comment
    10|10000 characters needed characters exceeded