Monday, September 3, 2012

Debug Script using WinMsgBox


There is an alternative to alert method in browser script to display message dialog box which can be only used for testing. Remember Server database doesn't support this so it can be only used on Local Database for testing purpose only.

Syntax for WinMsgBox:

WinMsgBox(“<string>” + <variable>);
WinMsgBox(<variable>);
WinMsgBox(“<string>”);

Please add below the function in Declaration section as a function so that it can be invoked from anywhere within the declared Siebel object.

function WinMsgBox(sMessage)
{
var retcode = SElib.dynamicLink("User32","MessageBoxExA",STDCALL,0,sMessage,"Alert",0);
return(retcode);
}

Examples:

WinMsgBox(“Displaying a message using WinMsgBox”);

//Displaying  Business Component Name
var BC = this.BusComp();
WinMsgBox(“Name of Business Component “+ BC.Name());

//Displaying  Field Value
var Status = this.GetFieldValue(“Status”);
WinMsgBox("Status:" + Status);


No comments:

Post a Comment