📚 SAP Business One SDK Help

UpdateCockpit Method
See Also  Example
pICockpit
The data for the cockpit to be updated. The Cockpit object must contain the key of the object to be updated.

Description

Updates an existing cockpit.

Syntax

Visual Basic
Public Sub UpdateCockpit( _
   ByVal pICockpit As Cockpit _
) 

Parameters

pICockpit
The data for the cockpit to be updated. The Cockpit object must contain the key of the object to be updated.

Example

Updating a Cockpit (C#)Copy Code
SAPbobsCOM.CockpitsParams cockParamsUpdate = cockService.GetCockpitList(); 
 
if (cockParamsUpdate.Count > 0) 

      //Update the first one. 
      SAPbobsCOM.CockpitParams cockParamUpdate = cockParamsUpdate.Item(0); 
      SAPbobsCOM.Cockpit cptUpdate = cockService.GetCockpit(cockParamUpdate); 
      cptUpdate.Description = "The updated description."; 
       
      cockService.UpdateCockpit(cptUpdate); 

See Also