I am trying to create a OrderNote, but I am not able to set values to certain properties like LastModifiedBy, UserName etc. Is there a way to work around this problem? Thanks.
var note = IOrder.Note.CreateNew();
note.Content = "My note content";
note.Createdate = currentdate;
note.lastModifiedBy = ???
note.UserName = ???
How to create a new OrderNote?
Moderator: Phil Barton
Re: How to create a new OrderNote?
The LastModifiedBy and Trustee properties on INote are type ITrustee. The IOrder.AllUsers and IOrder.CurrentUser properties provide read-only access to the system trustees/users. You should be able to assign one of those ITrustee references to your INote setter properties.
Re: How to create a new OrderNote?
Thanks mark! In case that the person is not found in all trystee/users, is there a way to create a new ITrustee?
Re: How to create a new OrderNote?
Not through the API as of version 2.6. That is an SPAdmin related activity (users and groups).