Community
Showing results for 
Search instead for 
Do you mean 
Reply

Creating Opportunity Note

Accepted Solution Solved
Avid Listener
Posts: 12
Country: United States
Accepted Solution

Creating Opportunity Note

Hi all,

 

I have a custom app that auto generates a group of opportunities, what is the easiest way to auto create a note for that opporunity and then set that note for each individual opportunity? I am using ACT 2011.

 

Thanks

 

Chris


Accepted Solutions
Solution
Accepted by topic author chrisdebona
‎09-25-2015 03:20 AM
Employee
Posts: 1,163
Country: USA

Re: Creating Opportunity Note

This will add a note to the current opportunity:

 

OpportunityList ol = _ActApp.ActFramework.Opportunities.GetOpportunityAsOpportunityList(_ActAp    p.ApplicationState.CurrentOpportunity);
DateTime now = DateTime.Now;
NoteType[] noteTypes = this._ActApp.ActFramework.Notes.GetNoteTypes();
ContactList c = _ActApp.ActFramework.Contacts.GetContactAsContactList(_ActApp.ActFramework.Contacts.GetMyRecord());
_ActApp.ActFramework.Notes.CreateNote(noteTypes[0], "TEST", now,
false, c, nullnull, ol, null, c[0].ID, c[0].ID);
Matthew Wood
Act! SDK Support
Community Moderator

View solution in original post


All Replies
Employee
Posts: 1,163
Country: USA

Re: Creating Opportunity Note

I don't have example of this already. Check out the NoteManager class though, there is a create note method that has an overload that accepts an opportunity list as a parameter.

Matthew Wood
Act! SDK Support
Community Moderator
Avid Listener
Posts: 12
Country: United States

Re: Creating Opportunity Note

Thank You for your help, is there any one out there that could give me an example of this? I have done a few things, but no luck.


THanks

 

Chris

Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Creating Opportunity Note

Hi Chris,

 

I don't think that there is a specific overload of the CreateNote method, so the only way I can think of to associate a Note with an Opportunity would be to create the Note with one of the existing overloads (whichever is most appropriate) which returns a Note object. You can then assign a OpportunityList to the OpportunityList property of the Note.

 

I hope someone else can show you a more elegant approach and I hope I am wrong re the CreatNote not having a MutableEntity object overload!

 

HTH

Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
Solution
Accepted by topic author chrisdebona
‎09-25-2015 03:20 AM
Employee
Posts: 1,163
Country: USA

Re: Creating Opportunity Note

This will add a note to the current opportunity:

 

OpportunityList ol = _ActApp.ActFramework.Opportunities.GetOpportunityAsOpportunityList(_ActAp    p.ApplicationState.CurrentOpportunity);
DateTime now = DateTime.Now;
NoteType[] noteTypes = this._ActApp.ActFramework.Notes.GetNoteTypes();
ContactList c = _ActApp.ActFramework.Contacts.GetContactAsContactList(_ActApp.ActFramework.Contacts.GetMyRecord());
_ActApp.ActFramework.Notes.CreateNote(noteTypes[0], "TEST", now,
false, c, nullnull, ol, null, c[0].ID, c[0].ID);
Matthew Wood
Act! SDK Support
Community Moderator
Bronze Elite Contributor
Posts: 2,115
Country: United_Kingdom

Re: Creating Opportunity Note

Doh! I didn't scroll down enough! Cheers Matthew.
Vivek Gargav
Caldere Associates Ltd.
www.caldere.com
vgargav@caldere.com
My Blog
Avid Listener
Posts: 12
Country: United States

Re: Creating Opportunity Note

This was an absolute solution, thank you for all of your help!