📚 SAP Business One SDK Help

UpdateNatureOfAssessee Method
See Also  Example
pINatureOfAssessee
The data for the nature of assessee to be updated. The NatureOfAssessee object must contain the key of the object to be updated.

Description

Updates an existing nature of assessee.

The data for the nature of assessee, including the key of the nature of assessee to be updated, is contained in the NatureOfAssessee passed to the method. To update a nature of assessee, you must first retrieve it using the GetNatureOfAssessee method.

Syntax

Visual Basic
Public Sub UpdateNatureOfAssessee( _
   ByVal pINatureOfAssessee As NatureOfAssessee _
) 

Parameters

pINatureOfAssessee
The data for the nature of assessee to be updated. The NatureOfAssessee object must contain the key of the object to be updated.

Remarks

If the nature of assessee is associated with a withholding tax code (WithholdingTaxCodes), you cannot update the Code and AssesseeType properties.

Example

Updating a nature of assessee (C#)Copy Code
try 

    SAPbobsCOM.NatureOfAssesseeParams oNOAParams = (SAPbobsCOM.NatureOfAssesseeParams)oNASrv.GetDataInterface(NatureOfAssesseesServiceDataInterfaces.noasNatureOfAssesseeParams); 
    oNOAParams.AbsEntry = 1; 
 
    SAPbobsCOM.NatureOfAssessee oNOA = oNASrv.GetNatureOfAssessee(oNOAParams); 
    oNOA.Description = "Updated"; 
    oNASrv.UpdateNatureOfAssessee(oNOA); 

catch (Exception ex) 

    Interaction.MsgBox(ex.Message, (Microsoft.VisualBasic.MsgBoxStyle)(0), null); 

See Also