HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
Discussions
These docs are for v20.3.44. Click to read the latest docs for v20.3.192.

Discussions

Ask a Question
Back to All

"An item with the same key has already been added" - whilst editing event rego

I am editing an event registration to add a new function to the registration.
When the original registration takes place, a default function is registered automatically.

So registrant has Event TEST1, Fns: DEFAULT

Then in a 2nd transaction, function A is added to the registration with a forced price of $1.00. All good.

Event TEST1, Fns: DEFAULT, A

Then in a 3rd transaction, function B is added to the registration with a forced price of $1.00. All good.

Event TEST1, Fns: DEFAULT, A,B

Then in a 4th transaction, function C is added to the registration with a forced price of $1.00
Exception: An item with the same key has already been added

There is nothing different about this function and any subsequent function I try to add once I'm at this stage, it always fails with the same error. Anyone know why?

 An item with the same key has already been added. 
 System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.ObjectModel.KeyedCollection`2.AddKey(TKey key, TItem item)
   at System.Collections.ObjectModel.KeyedCollection`2.InsertItem(Int32 index, TItem item)
   at Asi.Soa.Core.DataContracts.GenericPropertyDataCollection.Add(String propertyName, Object value)
   at Asi.Soa.ClientServices.EventManager.SetFunctionRegistrationStatusViaCart(EventFunctionData function, EventRegistrationStatusData currentRegistrationStatus, EventRegistrationStatusData newRegistrationStatus, String registrantPartyId, String payorPartyId, Boolean isAdjustment, String adjustmentOriginalInvoiceId, String adjustmentFunctionInvoiceId, Int32 originalQuantity, Uri websiteEditUrl, Int32 quantity, Boolean onWaitList, Boolean removeFromFunctionWaitlist)
   at Asi.Soa.ClientServices.EventManager.SetFunctionRegistrationStatus(String payorPartyId, String registrantPartyId, String eventFunctionId, EventRegistrationStatusData status, Uri websiteEditUrl, Int32 quantity, Boolean onWaitList, Boolean removeFromFunctionWaitlist)
   at Asi.Soa.ClientServices.EventManager.RegisterFunction(String registrantPartyId, String eventFunctionId, Int32 quantity)