Skip to content

Instantly share code, notes, and snippets.

@pigoz
Created October 28, 2010 19:29
Show Gist options
  • Save pigoz/652148 to your computer and use it in GitHub Desktop.
Save pigoz/652148 to your computer and use it in GitHub Desktop.
Siebel Scripting from Ruby using COM Data Control
require 'win32ole'
theApp = WIN32OLE.new('SiebelDataControl.SiebelDataControl.1')
cs = %{host="siebel://10.0.0.1:2321/Sieb78/EAIObjMgr_ita" Lang = "ITA"}
theApp.Login(cs, "uid", "password")
bo = theApp.GetBusObject("Order Entry Orders")
bc = bo.GetBusComp("Order Entry - Line Items")
bc.ClearToQuery()
bc.SetSearchSpec("Id", "1-LULZ")
bc.ExecuteQuery(0)
result = bc.FirstRecord()
puts bc.GetFieldValue("Order Id")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment