Skip to main content
Planview Customer Success Center

API error when using ApiOpportunity.Add()

SYMPTOMS:
Error when creating an opportunity with services, using "ApiOpportunity.Add" with OppServices property filled in.


ERROR/WARNING MESSAGES:
10:59:29 AM Level1: Source: Changepoint.ChangepointAPI2.ApiOppService.ValidateMe
10:59:29 AM Level1: Source: Changepoint.ChangepointAPI2.ApiOppService.ValidateMe
10:59:29 AM Level8: Initial Data Validation
10:59:29 AM Level2: Error: Number= -1 Message= Operation failed (system error).
10:59:29 AM Level2: StackTrace: at System.Data.DataTableCollection.get_Item(Int32 index)
at Changepoint.ChangepointAPI2.ApiOppService.ValidateMe(CPMetadataCheck BypassMetadataCheck, ApiOppService objOriginal)
10:59:29 AM Level1: Log for this source is end.

10:59:28 AM Level1: Source: Changepoint.ChangepointAPI2.ApiOpportunity.Add
10:59:28 AM Level3: [sId]:
10:59:29 AM Level1: Source: Changepoint.ChangepointAPI2.ApiOppService.ValidateMe
10:59:29 AM Level1: Source: Changepoint.ChangepointAPI2.ApiOppService.ValidateMe
10:59:29 AM Level8: Initial Data Validation
10:59:29 AM Level2: Error: Number= -1
10:59:29 AM Level2: StackTrace: at Changepoint.ChangepointAPI2.ApiException.CopyError(Exception ex, Boolean throwException)
at Changepoint.ChangepointAPI2.ApiOppService.ValidateMe(CPMetadataCheck BypassMetadataCheck, ApiOppService objOriginal)
at Changepoint.ChangepointAPI2.ApiOpportunity.ValidateOppService(ApiOppService oOppService, ApiOppService origOppService)
at Changepoint.ChangepointAPI2.ApiOpportunity.Add(String& sId)
10:59:29 AM Level1: Log for this source is end.


REASON:
The billing office ID was not supplied with the opportunity service.
RESOLUTION:
Supply the billing office ID with the opportunity service when creating the opportunity.