Thursday, July 2, 2009

Access Siebel from any external application, using URL with SWE commands

To access Siebel from any external application, using URL with SWE commands and query for a field value.

Create a business service and call the business service and method in URL.


BS:

Name of BS : GotoAccountsViewBS

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)

{

if (MethodName=="Methodcall")

{

// declarations

var sLocation = Inputs.GetProperty("sLocation");

var oBO = TheApplication().GetBusObject("Account");

var oBC = oBO.GetBusComp("Account");

var AccountisRecord;

oBC.SetViewMode(3);

oBC.ActivateField("Location");

oBC.ClearToQuery();

oBC.SetSearchSpec("Location", sLocation);

oBC.ExecuteQuery(ForwardOnly);

AccountisRecord = oBC.FirstRecord();

if (AccountisRecord == true){


TheApplication().GotoView("All Accounts across Organizations", oBO )

}

}

oBC = null;

oBO = null;

}

return (CancelOperation);

}


URL to incorporate in the external application:


http://mycompanysiebel.com/callcenter/start.swe?SWECmd=InvokeMethod&SWEMethod=Methodcall&SWEService=GotoAccountsViewBS& sLocation=MYACCOUNT&SWERF=1

--
Any questions, Please contact me via siva.ganga@gmail.com

No comments:

Post a Comment