Skip to main content

Posts

Showing posts with the label COMCreateObject

How to popup a message in Siebel

You can use COMCreateObject("WScript.Shell") for displaying the custom message or for debugging the issues in eScript. This can be used in server script and in older versions of Siebel (which supports vb script). Below is the example: //Instantiate var msg = COMCreateObject( "WScript.Shell" ); //Display message msg.popup( "Custom text" + variable ,0, "Message title" ); //Example: of text and variable concatenation msg.popup( "Doc Num:" +docNum + " Owner Id:" +OwnerId+ " P Id:" +POAsrId,0, "Debus Script" ); You can use TheApplication() .RaiseErrorText( "Text" + variable); but Siebel will consider this as error and will not execute any code after this.

How to create COM Objects in Siebel through client side VB Script

var objCon = COMCreateObject("ADODB.Connection"); objCon.Open("Provider=OraOLEDB.Oracle.1;Data Source=SIEBPRDDB;User Id=siebel;Password=P@ssWod;PLSQLRSet=1"); var oadoRecordsetUA = objCon.execute("SELECT MAX(SR_NUM) from siebel.s_srv_req where ROW_ID='"+sRowId+"'"); oadoRecordsetUA.moveFirst(); oadoFieldUA = oadoRecordsetUA.Fields.Item(0); strSRNum = oadoFieldUA.Value;