📚 SAP Business One SDK Help

UpdateDeposit Method
See Also  Example
pIDeposit
The data for the deposit to be updated. The Deposit object must contain the key of the object to be updated.

Description

Updates an existing deposit.

The data for the deposit, including the key of the deposit to be updated, is contained in the Deposit object passed to the method. To update a deposit, you must first retrieve it using the GetDeposit method.

Syntax

Visual Basic
Public Sub UpdateDeposit( _
   ByVal pIDeposit As Deposit _
) 

Parameters

pIDeposit
The data for the deposit to be updated. The Deposit object must contain the key of the object to be updated.

Example

Updating Deposit (C#)Copy Code
//Get an existing deposit object 
SAPbobsCOM.DepositsParams dpsParamsGetForUpdate = (SAPbobsCOM.DepositsParams)dpService.GetDepositList(); 
 
if (dpsParamsGetForUpdate.Count > 0) 

    foreach (SAPbobsCOM.DepositParams dpsParamGetForUpdate in dpsParamsGetForUpdate) 
    { 
        //Get deposit 
        SAPbobsCOM.Deposit dpsGetForUpdate = dpService.GetDeposit(dpsParamGetForUpdate); 
 
        //Update deposit journal remarks 
        dpsGetForUpdate.JournalRemarks = "Updating existing deposit"; 
 
        //Update the deposit 
        dpService.UpdateDeposit(dpsGetForUpdate); 
 
        //Change the first deposit only 
        break; 
     } 

See Also