📚 SAP Business One SDK Help

UpdateNCMCodeSetup Method
See Also  Example
pINCMCodeSetup
The data for the competitor to be updated. The SalesOpportunityCompetitorSetup object must contain the key of the object to be updated.

Description

Updates an existing NCM code.

The data for the NCM code, including the key of the NCM code to be updated, is contained in the NCMCodeSetup object passed to the method. To update a NCM code, you must first retrieve it using the GetNCMCodeSetup method.

Syntax

Visual Basic
Public Sub UpdateNCMCodeSetup( _
   ByVal pINCMCodeSetup As NCMCodeSetup _
) 

Parameters

pINCMCodeSetup
The data for the competitor to be updated. The SalesOpportunityCompetitorSetup object must contain the key of the object to be updated.

Remarks

You cannot update an NCM code that is associated with a DNF code, an item, or an item group.

Example

Updating an NCM code (C#)Copy Code
NCMCodeSetupParams getLine; 
SAPbobsCOM.NCMCodeSetup updateLine; 
getLine = (NCMCodeSetupParams)oNCMSrv.GetDataInterface(NCMCodesSetupServiceDataInterfaces.ncmcssNCMCodeSetupParams); 
 
getLine.AbsEntry = 9789; 
 
updateLine = oNCMSrv.GetNCMCodeSetup(getLine); 
updateLine.NCMCode = "updated"; 
updateLine.Description = "updated description"; 
 
oNCMSrv.UpdateNCMCodeSetup(updateLine);

See Also