📚 SAP Business One SDK Help

SwitchCockpit Method
See Also  Example
bstrCockpitTypeID
The code of the cockpit.

Description

Sets the cockpit with the provided CockpitTypeID to the current cockpit.

Syntax

Visual Basic
Public Sub SwitchCockpit( _
   ByVal bstrCockpitTypeID As String _
) 

Parameters

bstrCockpitTypeID
The code of the cockpit.

Example

Swiching Between Top-Level Cockpits (C#)Copy Code
SAPbouiCOM.Cockpits ckpts = sbo_Application.Cockpits; 
 
//Get the current cockpit. 
SAPbouiCOM.Cockpit ckpt = (SAPbouiCOM.Cockpit)ckpts.CurrentCockpit; 
 
 
//Change the "current" cockpit; you can do this by shifting to another cockpit. 
 
//Then reset the former one as the "Current" cockpit. 
ckpts.SwitchCockpit(strCurrentCockpitTypeID);

See Also