📚 SAP Business One SDK Help

UpdateServiceCallType Method
See Also  Example
pIServiceCallType
The data for the service call type to be updated. The ServiceCallType object must contain the key of the object to be updated.

Description

Updates an existing service call type.

The data for the service call type, including the key of the type to be updated, is contained in the ServiceCallType passed to the method. To update a service call type, you must first retrieve it using the GetServiceCallType method.

Syntax

Visual Basic
Public Sub UpdateServiceCallType( _
   ByVal pIServiceCallType As ServiceCallType _
) 

Parameters

pIServiceCallType
The data for the service call type to be updated. The ServiceCallType object must contain the key of the object to be updated.

Example

Updating a service call type (C#)Copy Code
ServiceCallTypeParams callTypeParams = callTypesService.GetDataInterface(ServiceCallTypesServiceDataInterfaces.sctsServiceCallTypeParams) as ServiceCallTypeParams; 
callTypeParams.CallTypeID = 2; 
ServiceCallType callType = callTypesService.GetServiceCallType(callTypeParams); 
callType.Name = "new Name"; 
             
try 

     callTypesService.UpdateServiceCallType(callType); 

catch (Exception ex) 

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

See Also