Showing results for 
Search instead for 
Do you mean 

Possible GetOpportunityFieldDescriptor Bug?

Nickel Contributor
Posts: 175
Country: USA

Possible GetOpportunityFieldDescriptor Bug?

I wasn't sure where to post this, but this seems like a bug to me. If there is a better place for this, or a different procedure I should follow to report these, please let me know.


In order to get the values I need for inserting Companies/Contacts/Opportunities, I've used the basic code below.


Dim dt As New DataTable
dt.Columns.Add("Name", GetType(String))
dt.Columns.Add("Display", GetType(String))
dt.Columns.Add("Alias", GetType(String))

'This works
For Each fd As Act.Framework.Contacts.ContactFieldDescriptor In actf.Contacts.GetContactFieldDescriptors()
     dt.Rows.Add(New String() {fd.Name, fd.DisplayName, fd.Alias})
'This Doesn't work  
For Each od As Act.Framework.Opportunities.OpportunityFieldDescriptor In actf.Opportunities.GetOpportunityFieldDescriptors
     dt.Rows.Add(New String() {od.Name, od.DisplayName, od.Alias})

'This works
For Each od As Act.Framework.MutableEntities.MutableEntityFieldDescriptor In actf.Opportunities.GetMutableEntityFieldDescriptors
     dt.Rows.Add(New String() {od.Name, od.DisplayName, od.Alias})

dgvResults.DataSource = dt

Dim obj() As Object = actf.Opportunities.GetOpportunityFieldDescriptors 'Returns an array of the correct length, but each object is Nothing (null)

 As I note in the code, the "GetOpportunityFieldDescriptors()" method returns an array of the proper length, but each item in the array is nothing. I was able to get what I needed with the more general "GetMutableEntityFieldDescriptors()" method. I believe the same thing happens with the "GetOpportunityFieldDescriptor" method, as I would get an "Object Reference not set to an instance of an object" error when trying to use the single FieldDescriptor that is returned. Using "GetMutableEntityFieldDescriptor" works just fine though.


I'm running "Sage ACT! Premium 2011 Version 13.0.401.0, Hot Fix 2". I try to use the most specific object I can when programming, so I would prefer to use the OpportunityFieldDescriptor, but it just doesn't work. Thanks for any insight you can provide.

Posts: 1,163
Country: USA

Re: Possible GetOpportunityFieldDescriptor Bug?

This is the correct place to post any issue or questions related to the SDK.


This issue has been reported and is still under investigation, it's unlikely to be resolved in the current version, however there is a workaround as you've already discovered.

Again, apologies for any inconvenience.

Matthew Wood
Act! SDK Support
Community Moderator