10-25-2011 11:28 AM
I am trying to write a note to a contact, and I am getting hung up on the 'notetype' parameter. Here's my code:
Sub MakeNote(ByRef fwk As Act.Framework.ActFramework, ByRef contact As Act.Framework.Contacts.Contact, ByVal text AsString)
Dim ntype AsAct.Framework.Notes.NoteType, note as Act.Framework.Notes.Note
ntype = New Act.Framework.Notes.NoteType(Act.Framework.Notes.SystemNoteType)
note = fwk.Notes.CreateNote(ntype, text, Now, False, contact)
Visual Studio rejects the third line from the bottom.
Thanks for your help,
10-26-2011 06:05 AM
WIthout the exception I'm just having to guess. But I think you've used an invalid note type. The note manage class should have a GetNoteTypes method, so you can get a collection of all valid note types.