Application_PreNavigate Event

Siebel CRM calls the Application_PreNavigate event before it displays the view where the user navigates. This event returns CancelOperation or ContinueOperation. For more information, see Caution About Using the Cancel Operation Event Handler.

Format

Application_PreNavigate(DestViewName, DestBusObjName)

The following table describes the arguments for the Application_PreNavigate event.

Argument Description

DestViewName

Name of the view where the user navigates.

DestBusObjName

Business object that the destination view references.

Used With

Server Script

Examples

In the following Siebel eScript example, the script Identifies the current business object and sets the current contact Id as a global variable. You can use this variable to keep context:

function Application_PreNavigate (DestViewName, DestBusObjName)
{
   try
   {
      var currentView = this.ActiveViewName();
      var BO = this.ActiveBusObject();
      if(BO.Name() == "Contact")
      {
         var BC = BO.GetBusComp("Contact");
         var id = BC.GetFieldValue("Id");
         TheApplication().SetSharedGlobal("ContactId", id);
      }
   }
   catch (e)
   {
      this.Trace("Exception caught: "+e.toString());
   }
   return (ContinueOperation);
}