Community
Showing results for 
Search instead for 
Do you mean 
Reply

Override Record Manager for a Note

Loyal Listener
Posts: 19
Country: USA

Override Record Manager for a Note

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.

Employee
Posts: 1,163
Country: USA

Re: Override Record Manager for a Note

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[0], "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;
n.Update();
Matthew Wood
Act! SDK Support
Community Moderator