Thursday 12 May 2022

Siebel GoTo View - Handling Realtime cases

 Hello All, 


We all must have used GoTo view functionality of siebel to navigate to a particular view from current view.

What if the requirement is to get to a particular record on a record? Well this cannot be directly achieved via GoTo View as we cannot pass Id there.

But this can be achieved if we pass the context BO in GoTo View, i.e. The syntax is TheApplication().GoToView("ViewName","BO"), we need to set the record context in BO then pass the BO.

Algo:

1.Take the RowId of the record we want to navigate to 

2. Query the record to set the context

3. Pass the BO Variable with GoTo View, to see the magic happen :-)


Sample Script:

 if(MethodName == "Navigate")
 {
 var sB0 = TheApplication().GetBusObject("Auto Vehicle")
 var gBc = sB0.GetBusComp("Auto Vehicle");
 var assetId = this.BusComp().GetFieldValue("Asset Id"); //Id for the record we want to navigate

 with(gBc)  //Set the context by querying the record
     {
     ClearToQuery();
     SetViewMode(AllView);
     SetSearchSpec("Id",assetId);
     ExecuteQuery(ForwardOnly);
     }
 TheApplication().GotoView("Auto Vehicle Service Request View",sB0);    //call goto view with BO context
   return(CancelOperation);
 }
//end method

Simple yet very useful, your comments and suggestion are always welcome.

Siebel GoTo View - Handling Realtime cases

 Hello All,  We all must have used GoTo view functionality of siebel to navigate to a particular view from current view. What if the require...