How to create a new OrderNote?

Discussions related to SoftPro Select Server development.

Moderator: Phil Barton

Post Reply
kqian
Posts: 68
Joined: Wed Feb 23, 2011 4:01 pm

How to create a new OrderNote?

Post by kqian »

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 = ???
Mark McKenna

Re: How to create a new OrderNote?

Post by Mark McKenna »

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.
kqian
Posts: 68
Joined: Wed Feb 23, 2011 4:01 pm

Re: How to create a new OrderNote?

Post by kqian »

Thanks mark! In case that the person is not found in all trystee/users, is there a way to create a new ITrustee?
Mark McKenna

Re: How to create a new OrderNote?

Post by Mark McKenna »

Not through the API as of version 2.6. That is an SPAdmin related activity (users and groups).
Post Reply