Skip to Content

Delete Activity using ActivitiesService.

I'm trying to delete activity using the service.

CompanyService companyService = null;
ActivitiesService activitiesService = null;
ActivityParams activityParams = null;
try
    {
	companyService = company.GetCompanyService();
	activitiesService = companyService.GetBusinessService( ServiceTypes.ActivitiesService ) as ActivitiesService;
	activityParams = activitiesService.GetDataInterface( ActivitiesServiceDataInterfaces.asActivityParams ) as ActivityParams;
	activityParams.ActivityCode = activityID;
	activitiesService.DeleteActivity( activityParams );	
    }
finally
    {
	//Release
    }

This code thrown Exception: "[-10] Internal Error" on DeleteActivity() line. At the same time functions Add() and Update() works fine.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 19, 2017 at 09:24 AM

    I found solution: you should delete reference to activity from parent object (service call in my case).

    Add comment
    10|10000 characters needed characters exceeded