📚 SAP Business One SDK Help

UpdateBusinessPartnerProperty Method
See Also  Example
pIBusinessPartnerProperty
The data for the business partner property to be updated. The BusinessPartnerProperty object must contain the key of the object to be updated.

Description

Updates an existing business partner property.

The data for the business partner property, including the key of the business partner property to be updated, is contained in the BusinessPartnerProperty object passed to the method. To update a business partner property, you must first retrieve it using the GetBusinessPartnerProperty method.

Syntax

Visual Basic
Public Sub UpdateBusinessPartnerProperty( _
   ByVal pIBusinessPartnerProperty As BusinessPartnerProperty _
) 

Parameters

pIBusinessPartnerProperty
The data for the business partner property to be updated. The BusinessPartnerProperty object must contain the key of the object to be updated.

Example

Updating a business partner property (C#)Copy Code
try 

     oBPPropSrv = (BusinessPartnerPropertiesService)(MainModule.oCmpSrv.GetBusinessService(ServiceTypes.BusinessPartnerPropertiesService)); 
     BusinessPartnerPropertyParams getLine; 
     BusinessPartnerProperty updateLine; 
 
     getLine = (BusinessPartnerPropertyParams)oBPPropSrv.GetDataInterface(BusinessPartnerPropertiesServiceDataInterfaces.bppsBusinessPartnerPropertyParams); 
                                 
     // update 
     getLine.PropertyCode = 5; 
     updateLine = oBPPropSrv.GetBusinessPartnerProperty(getLine); 
     updateLine.PropertyName = "New Value"; 
     oBPPropSrv.UpdateBusinessPartnerProperty(updateLine);                 

catch (Exception ex) 

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

See Also