📚 SAP Business One SDK Help

UpdateServiceCallOrigin Method
See Also  Example
pIServiceCallOrigin
The data for the service call origin to be updated. The ServiceCallOrigin object must contain the key of the object to be updated.

Description

Updates an existing service call origin.

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

Syntax

Visual Basic
Public Sub UpdateServiceCallOrigin( _
   ByVal pIServiceCallOrigin As ServiceCallOrigin _
) 

Parameters

pIServiceCallOrigin
The data for the service call origin to be updated. The ServiceCallOrigin object must contain the key of the object to be updated.

Remarks

You cannot update a system-defined origin.

An origin is system defined if the Locked field in the OSCO table is set to Y.

Example

Updating a service call origin (C#)Copy Code
ServiceCallOriginParams originParams = callOriginsService 
    .GetDataInterface(ServiceCallOriginsServiceDataInterfaces.scosServiceCallOriginParams) as ServiceCallOriginParams; 
 
originParams.OriginID = 3; 
ServiceCallOrigin callOrigin = callOriginsService.GetServiceCallOrigin(originParams); 
callOrigin.Name = "new Name"; 
 
Console.WriteLine("Update a ServiceCall Origin with id=" + originParams.OriginID); 
 
try 

    callOriginsService.UpdateServiceCallOrigin(callOrigin); 

catch (Exception ex) 

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

See Also