📚 SAP Business One SDK Help

UpdateServiceCallProblemType Method
See Also  Example
pIServiceCallProblemType
The data for the service call problem type to be updated. The ServiceCallProblemType object must contain the key of the object to be updated.

Description

Updates an existing service call problem type.

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

Syntax

Visual Basic
Public Sub UpdateServiceCallProblemType( _
   ByVal pIServiceCallProblemType As ServiceCallProblemType _
) 

Parameters

pIServiceCallProblemType
The data for the service call problem type to be updated. The ServiceCallProblemType object must contain the key of the object to be updated.

Example

Updating a service call problem type (C#)Copy Code
public void Update() 

    ServiceCallProblemTypeParams callProblemTypeParams; 
    callProblemTypeParams = callProblemTypesService.GetDataInterface(ServiceCallProblemTypesServiceDataInterfaces.scptsServiceCallProblemTypeParams) as ServiceCallProblemTypeParams; 
    callProblemTypeParams.ProblemTypeID = 3; 
    ServiceCallProblemType callProblemType = callProblemTypesService.GetServiceCallProblemType(callProblemTypeParams); 
    callProblemType.Name = "new Name"; 
    callProblemType.Description = "new description"; 
 
    try 
    { 
        callProblemTypesService.UpdateServiceCallProblemType(callProblemType); 
    } 
    catch (Exception e) 
    { 
        PrintExceptionMessage(e); 
    } 

See Also