06-02-2010 10:16 AM
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
06-02-2010 03:48 PM
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.
06-02-2010 10:38 AM
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.
06-02-2010 12:49 PM
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
06-02-2010 01:00 PM - edited 06-02-2010 01:03 PM
06-02-2010 02:44 PM
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
06-02-2010 03:48 PM
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.
06-02-2010 04:40 PM
06-03-2010 04:26 AM
Ok I use OLEDB2 to retrieve every notes from every opportunity. Everything works fine now. Thanks for your help !
Stephen