📚 SAP Business One SDK Help

UpdateSingleInstanceInSeries Method
See Also  Example
pIActivity

The data for the single activity instance to be updated. The Activity object must contain the key of the object to be updated.

Description

Updates an existing single instance from a recurring activity series.

The data for the activity, including the key of the activity to be updated, is contained in the Activity object passed to the method. To update an activity instance, you must first retrieve it using the GetSingleInstanceFromSeries method.

Syntax

Visual Basic
Public Function UpdateSingleInstanceInSeries( _
   ByVal pIActivity As Activity _
) As ActivityParams

Parameters

pIActivity

The data for the single activity instance to be updated. The Activity object must contain the key of the object to be updated.

Example

Updating a Single Instance from an Activity Series (C#)Copy Code
//Get a single instance from a series 
ActivityInstancesParams oInstanceParams = (ActivityInstancesParams)oActSrv.GetDataInterface(ActivitiesServiceDataInterfaces.asActivityInstancesParams); 
oInstanceParams.ActivityCode = seriesActCode; 
oInstanceParams.InstanceDate = DateTime.Parse("18/03/2010"); 
oGet = oActSrv.GetSingleInstanceFromSeries(oParams); 
oGet.StartTime = DateTime.Parse("15:30:00"); 
 
//Update a single activity from a series 
oActSrv.UpdateSingleInstanceInSeries(oGet); 

See Also