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.
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 :-)
| 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
TheApplication().GotoView("Auto Vehicle Service Request View",sB0); //call goto view with BO context