Community
Showing results for 
Search instead for 
Do you mean 
Reply

Retrieve notes from an opportunity

Accepted Solution Solved
Tuned Listener
Posts: 16
Country: Belgium
Accepted Solution

Retrieve notes from an opportunity

Hello,

 

I'm trying to get all notes from each opportunity in a database (implementing the iplugin interface). I'm using the GetNotes() method from the opportunity object.

The null value is always sent and I don't understand why because those opportunities have notes !

Here are a few lines :

 

if (__currentOppoList[i].Stage != null) xl.Write("D" + j, __currentOppoList[i].Stage.Name);

if (__currentOppoList[i].GetNotes() != null) xl.Write("F" + j, __currentOppoList[i].GetNotes().Count.ToString());

if (__currentOppoList[i].CreateDate != null) xl.Write("E" + j, __currentOppoList[i].CreateDate.ToShortDateString()); 

 

Everything works fine exept the GetNotes(). Any ideas ?

 

TIA !

 

Stephen 


Accepted Solutions
Solution
Accepted by topic author Zwann
‎09-25-2015 03:20 AM
Nickel Elite Contributor
Posts: 937
Country: USA

Re: Retrieve notes from an opportunity

To be clear - I think OLEDB2 is a better approach to getting what you want in your scenario - it is more efficient.  It also has the added benefit of working whereas the other methods (as noted) seem to have defects with current implementation.

 

 

View solution in original post


All Replies
Nickel Elite Contributor
Posts: 937
Country: USA

Re: Retrieve notes from an opportunity

That's weird I thought GetNotes() was intended for a specific Opp object instance and not an oppList. 

 

Just a suggestion - if you want to get  all notes for an opportunity range consider using the OLEDB2 provider in your code - you can write a simple SQL statement to retrieve your Notes.  This will offload the filtering to the DB server and should be more performant than looping through an object list and getting notes from each.

 

OLEDB2 is in ACT! 2010 and higher - there's a devnet downloads control where I show an example of using OLEDB2 inside of code to get Opportunity info.

 

 

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Retrieve notes from an opportunity

Allen,

Isn't this the same error I reported to you February. I still have not gotten any response from you or Brain Mowka whom you said you were forwarding to. The SDK does not return any values for GetActivities, GetDocuments, GetHistories or GetNotes.

 

Dim cOpportunity As Act.Framework.Opportunities.Opportunity        cOpportunity = ACTFM.Opportunities.GetOpportunitiesByID(Nothing, Nothing, oppKeys)        cOpportunity.GetContacts(Nothing)   '// OK        cOpportunity.GetCompanies(Nothing'// OK        cOpportunity.GetGroups(Nothing'// OK        cOpportunity.GetProducts(Nothing'// OK         cOpportunity.GetActivities()  '// returns NULL ??        cOpportunity.GetDocuments()  '// returns NULL ??  cOpportunity.GetHistories()  '// returns NULL ??        cOpportunity.GetNotes()  '// returns NULL ??

 

And If I remember correctly this error was also posted 5 months previous to my email:

http://community.act.com/sage/board/message?board.id=Pub_Dev&message.id=2209&query.id=55963#M2209

 

Again I ask: Is there a central depository of SDK issues and the status on the resolution?

 

It sounds from your reply here your work around is to use the OLEDB2 provider. Is that the offical fix?

 

Thanks

-- Jim Durkin

Employee
Posts: 1,163
Country: USA

Re: Retrieve notes from an opportunity

[ Edited ]
For the time being the best way to check the status of any particular fix is to contact me directly, that may be changing in the future but as of right now I'm not aware of any way that partners can check the status of open tickets.
Message Edited by mwood on 06-02-2010 01:03 PM
Matthew Wood
Act! SDK Support
Community Moderator
Tuned Listener
Posts: 16
Country: Belgium

Re: Retrieve notes from an opportunity

I try different methods like GetDocuments, GetHistories, ... and, like Jim, I got null values returned. Does it mean that I have to use oledb to get what I want ?

Thanks for your answers !

 

Stephen 

Solution
Accepted by topic author Zwann
‎09-25-2015 03:20 AM
Nickel Elite Contributor
Posts: 937
Country: USA

Re: Retrieve notes from an opportunity

To be clear - I think OLEDB2 is a better approach to getting what you want in your scenario - it is more efficient.  It also has the added benefit of working whereas the other methods (as noted) seem to have defects with current implementation.

 

 

Bronze Super Contributor
Posts: 1,231
Country: USA

Re: Retrieve notes from an opportunity

Since the current implementation has defects isn't the OLEDB2 the ONLY implementation?

Is there a time frame of when the defect is going to be fixed?

 

-- Jim Durkin

Tuned Listener
Posts: 16
Country: Belgium

Re: Retrieve notes from an opportunity

Ok I use OLEDB2 to retrieve every notes from every opportunity. Everything works fine now. Thanks for your help !

 

Stephen