📚 SAP Business One SDK Help

UpdateProfitCenter Method
See Also  Example
pIProfitCenter
The data for the profit center to be updated. The ProfitCenter object must contain the key of the object to be updated.

Description

Updates an existing profit center.

The data for the profit center, including the key of the profit center to be updated, is contained in the ProfitCenter object passed to the method. To update a profit center, you must first retrieve it using the GetProfitCenter method.

Syntax

Visual Basic
Public Sub UpdateProfitCenter( _
   ByVal pIProfitCenter As ProfitCenter _
) 

Parameters

pIProfitCenter
The data for the profit center to be updated. The ProfitCenter object must contain the key of the object to be updated.

Example

Updating a profit center (Visual Basic)Copy Code
oPCParams.CenterCode = "Code"
oPC = oPCService.GetProfitCenter(oPCParams)
oPC.InWhichDimension = 1
oPCService.UpdateProfitCenter(oPC)

See Also