Community
Showing results for 
Search instead for 
Do you mean 
Reply

Updating an Opportunities

Copper Contributor
Posts: 41
Country: USA

Updating an Opportunities

When updating an opp I get the following error:

 

Error.PNG

Bob Lozinak
Twelve/Three Marketing, Inc.
Software Developer
Employee
Posts: 1,163
Country: USA

Re: Updating an Opportunities

Hard to tell a lot from just this, obviously from the exception text we know that some object is null. Set a break point prior to where the exception is thrown and you should be able to sort out which object is null at this point. If you're creating an opportunity and then making changes prior to saving it, that may be why you're getting this.

Matthew Wood
Act! SDK Support
Community Moderator
Copper Contributor
Posts: 41
Country: USA

Re: Updating an Opportunities

Thanks for the quick reply. I am using a plug in that would incremante a number. I am able to read the field but can not seem to write to it. I am not sure how to debug a plugin.

Bob Lozinak
Twelve/Three Marketing, Inc.
Software Developer
Employee
Posts: 1,163
Country: USA

Re: Updating an Opportunities

Ahh, understood. You'd probably need to contact whomever the developer is.

Matthew Wood
Act! SDK Support
Community Moderator
Copper Contributor
Posts: 41
Country: USA

Re: Updating an Opportunities

I am the developer!

Bob Lozinak
Twelve/Three Marketing, Inc.
Software Developer
Employee
Posts: 1,163
Country: USA

Re: Updating an Opportunities

Sorry about that, when you said "I was using a plugin", I thought it was one that someone else had made.

 

Assuming you have the source In VS, right click on your project and choose properties, in the debug tab I set ActSage.exe as the external program to start when I debug. I also add this "copy "$(TargetPath)" "C:\Program Files\Act\Act for Windows\Plugins"" to the build events so I don't have to paste in the updated plugin each time. Once you've done the first thing you ought to be able to set breakpoints and debug this like any other project.

Matthew Wood
Act! SDK Support
Community Moderator
Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Updating an Opportunities

Hi Bob,

 

It might be useful if you could post up some of the code that leads to the exception.

 

Trying to guess from the error message...are you seting the value of an OpportunityFieldDescriptor? To me it looks like you have passed an illegal NULL somewhere in that method?

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
Copper Contributor
Posts: 41
Country: USA

Re: Updating an Opportunities

This is the code that does the updating:

 

CO.AcctIDField= TBL_OPPORTUNITY.USER1


If Not CurrentOpp Is Nothing Then
CurrentOpp.Fields.Item(CO.AcctIDField, Act.Framework.MutableEntities.FieldNameType.Real) = 99 
CurrentOpp.Update()
ActApp.CurrentView.RefreshView()
Else

Bob Lozinak
Twelve/Three Marketing, Inc.
Software Developer
Copper Contributor
Posts: 41
Country: USA

Re: Updating an Opportunities

Ok, I was able to get past that error. If you notice in the code above 99 is not in Quotes. This is what was throwing the error!

Bob Lozinak
Twelve/Three Marketing, Inc.
Software Developer