cancel
Showing results for 
Search instead for 
Did you mean: 

User interface to confirm a production order

Former Member
0 Kudos

Hello,

How can i make a User interface in order to confirm a production orders?

I have a html form, how can i send the value of my form to my MII transaction?

Regards,

Victor

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

There are a couple ways you can do this.

The easiest way is through the iCommand applet.

1) Create an XACUTE query for your transaction, linking all the input parameters and output paramter.

2) Create an iCommand applet on your irpt page.

<APPLET NAME="giveMeaningfulName" CODEBASE="/XMII/Classes" CODE="iCommand" ARCHIVE="illum8.zip" WIDTH="0" HEIGHT="0" MAYSCRIPT>

        <PARAM NAME = "QueryTemplate" VALUE="Path to XACUTE query you created. MII workbench allows drag and drop.">

</APPLET>

3) Setup and exacute the command through javascript on a button click or some other event.

//Make sure in the following example to change giveMeaningfulName to the name you gave your applet.

function buttonClicked()

{

    var queryObject = document.giveMeaningfulName.getQueryObject();

    queryObject.setParam(1, param1);
    queryObject.setParam(2, param2);

    .

    .

    .

    queryObject.setParam(n, paramN);

    var result = document.giveMeaningfulName.executeCommand();

    if(result == false)

          alert("Confirmation failed. Error message: " + document.giveMeaningfulName.getLastError());

}

Alternatively a more complex way is to use AJAX. This is a far better method since is runs asyncronously and doesn't lock the user's browser like java applets do.

try resarching how the XMLHTTPREQUEST object works in javascript and the url you want to call is.

http:\\miiserver:port\XMII\Runner?Transaction=Path to transaction&Param Name=Parameter Value&OutputParameter=Parameter Name

Transaction path starts at your project name and maps down to the transaction name without the .trx

Param Name is the actual name you gave your transaction parameters. Separate them by &.

This will return any output parameter that is non xml in the standard MII XML format of /Rowsets/Rowset/Row. If the output parameter is of type XML it will just return the XML.

Former Member
0 Kudos

Hi Jasper,

Thanks for your help

Regards, Victor

Answers (0)