Can an "InvokeButton" method used w/"Dialog" button be made synchronous?

SOLVED

Can an "InvokeButton" method used w/Custom Office External Link Definition Link Type of "Dialog" be made Synchronous?

My script uses the "InvokeButton" method but control is returned immediately before a response has been made. Is there a way to "not return control" until the dialog box has been dismissed?

Parents
  • 0

    I'll need to double check something but one way to accomplish this would be a UI script on the Exit event of the dialog panel.  You could use the SetStorageVar and GetStorageVar methods to pass values between the scripts executing.

  • +1 in reply to David Speck
    verified answer

    The NomadsProcess method inherited from SY_CommonUI should do the trick.

      NomadsProcess(*)

    Calls Nomads process.

    Syntax

    Object'NomadsProcess(*)

    Parameters

    *

    You can pass PanelName and Library plus 20 additional arguments to this method.

    Returns

    Always Returns 1.

    Example

    _OBJ'NomadsProcess("DCOPY", "SY_ROLE.M4L")

    Notes

    This method is used when you want to bring up another dialog that is associated with the same business object. This method will save off the current environment and call the Nomads Process method. When returning from the additional dialog it will reset your environment back.

     With the following set up.

    You can test the following code.

    oSession.AsObject(oSession.UI).MessageBox "", "Before."
    oUIObj.NomadsProcess "DLG_LINK_001", "IM_Item.M4L"
    oSession.AsObject(oSession.UI).MessageBox "", "After."

     The "before" message occurs first, once you click ok, it launches the dialog panel, once the dialog panel is closed, the "after" message is displayed.

  • 0 in reply to David Speck

    This worked in my Column Post Validate script and in the next statement I was able to GetValue the UDF entered in the dialog box:

    oSession.AsObject(oScript.UIObj).NomadsProcess "DLG_LINK_001", "SO_INVOICE.M4L"
    r = oBusObj.GetValue("UDF_ITEMCODE_INPUT$", sUDF_ItemCode_Input)

    I had already written a post last night saying this couldn't be done, but forgot to press "Reply".

    Elliot, I hope you can do something recognize for his incredible contributions here. What say we all?

    Thank you David!

Reply
  • 0 in reply to David Speck

    This worked in my Column Post Validate script and in the next statement I was able to GetValue the UDF entered in the dialog box:

    oSession.AsObject(oScript.UIObj).NomadsProcess "DLG_LINK_001", "SO_INVOICE.M4L"
    r = oBusObj.GetValue("UDF_ITEMCODE_INPUT$", sUDF_ItemCode_Input)

    I had already written a post last night saying this couldn't be done, but forgot to press "Reply".

    Elliot, I hope you can do something recognize for his incredible contributions here. What say we all?

    Thank you David!

Children
No Data