Skip to main content

Posts

Showing posts from March, 2020

How to add SearchSpec (query) on Applet Load Event through Applet Server Script in Siebel

If record is found every time when user navigate to Applet that record will be displayed. If record is not found Applet will be empty but user can use Query to found desired record. function WebApplet_Load () { var currBC = this.BusComp();     with (currBC)     {        SetViewMode(AllView);        ClearToQuery();        SetSearchSpec("SSN", "abc123xyz789");        ExecuteQuery(ForwardOnly);     } }

How to invoke workflow through BC eScript, BC User Property and Runtime Events

Through eScript  BC InvokeMethod if (MethodName == "MyMethod") { var oBS=TheApplication().GetService("Workflow Process Manager"); var Inp=TheApplication().NewPropertySet(); var Out=TheApplication().NewPropertySet(); Inp.SetProperty("Object Id",TheApplication().ActiveBusObject().GetBusComp("My BC Name").GetFieldValue("My BC Field")); Inp.SetProperty("ProcessName","My Workflow"); oBS.InvokeMethod("RunProcess",Inp,Out); return (CancelOperation);   } On BC PreSetField if(FieldName == "My Field Name")    {     if(FieldValue == "My Field Value") { var Inp=TheApplication().NewPropertySet(); var Out=TheApplication().NewPropertySet(); Inp.SetProperty("Object Id",TheApplication().ActiveBusObject().GetBusComp("My BC Name").GetFieldValue("My BC Field")); Inp.SetProperty("ProcessName","My Workflow...

Siebel Go to View eScript

function GotoView() { var BO : BusObject = TheApplication().GetBusObject("Contact"); var BC : BusComp = BO.GetBusComp("Contact"); this.BusComp().ActivateField("Contact Id"); var sConId = this.BusComp().GetFieldValue("Contact Id"); with(BC) { SetViewMode(AllView); ClearToQuery(); ActivateField("Id"); SetSearchSpec("Id", sConId); ExecuteQuery(ForwardOnly); if (FirstRecord()) { TheApplication().GotoView("Contact Details View", BO); } } }