03-09-2011 04:44 PM
I'm transferring notes from another system using ActFramework.Notes.CreateNote() and would like to be able to override the record manager. Currently it defaults to the logged in user.
I see there's discussion on the board about how to do this with an opportunity, but a SetRecordManager() method doesn't exist in the Note class.
03-10-2011 07:34 AM
Once you've created a note, you can use the Note.ManageUserID and Note.CreateUserID to assign the manager and creator of a note. The following example is done with the demodatabase, I'm logged in a Chris Huffman and the note creator and manager is Allison Mikola.
NoteType noteTypes = ActApp.ActFramework.Notes.GetNoteTypes();
Note n = ActApp.ActFramework.Notes.CreateNote(noteTypes, "New Test Note", System.DateTime.Now, false, ActApp.ActFramework.Contacts.GetMyRecord());
Act.Framework.Users.User Allison = ActApp.ActFramework.Users.GetUser("Allison Mikola");
n.ManageUserID = Allison.ID;
n.CreateUserID = Allison.ID;