Community
Showing results for 
Search instead for 
Do you mean 
Reply

Nullreference error when Opportunity.UpdateContacts(added, removed)

Copper Contributor
Posts: 147
Country: Netherlands

Nullreference error when Opportunity.UpdateContacts(added, removed)

We have a client which is just upgraded to v20.1, and we have made an addon for them which (among other things) attaches and de-attaches contacts for the current opportunity.

 

For this, the function <opportunity instance>.UpdateContacts(Guid[] added, Guid[] removed) is used.

 

But since the upgrade they get the following error message:

 

System.NullReferenceException: Object reference not set to an instance of an object.

at Act.Framework.Opportunities.OpportunityManagerDB.AssociateBarker(Guid oppId, Guid[] assocs, RecordType assocType)

at Act.Framework.Opportunities.OpportunityManagerDB.UpdateContacts(Guid oppId, Guid[] adds, Guid[] removes)

at Act.Framework.Associations.ColligationManager.Update(String targetEntityName, Guid target, String sourceEntityName, Guid[] add, Guid[] remove)

at Act.Framework.Associations.ColligationBroker.UpdateContacts(Guid[] target, Guid[] added, Guid[] removed)

at Act.Framework.Opportunities.Opportunity.UpdateContacts(Guid[] added, Guid[] removed)

at

<my own code>

 

Is this an Act! bug? And how can it be fixed? The customer heavily relies on that addon working correctly.

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands
Highlighted
Copper Contributor
Posts: 147
Country: Netherlands

Re: Nullreference error when Opportunity.UpdateContacts(added, removed)

As we said last wednessday, here's the source attached for this project.

 

Controller.cs line 221 adds the contact to an opportunity, 

Controller.cs line 375 removes the contact from an opportunity, 

Greetings,

ACT Certified Consultants
TendenZ
the Netherlands