Set creatd by on extended change request
-
Monday, June 25, 2012 2:17 PM
Hi,
I have created an extended class from the change request and use the sdk to create instances of this extended change request, i can set the values of the title,display name, etc and the customized properties but cannot set the created by property.
Sample of the code below
this.changeProjection.Object[this.changeClass, "Id"].Value = "some id";
this.changeProjection.Object[this.changeClass, "Title"].Value = "XYZ Title"
I have tried to use same approach and set the user using
this.changeProjection.Object[this.changeClass, "CreatedByUser"].Value = changeId;
but i get error Class [MyNameSpace.ChangeRequest] does not contain a property with name 'CreatedByUser'.
Appreciate any help.Thanks
All Replies
-
Monday, June 25, 2012 2:30 PMModerator"Created by user" field is a type projection component. So you must create new intance of the type projection or add new relationship object.
http://www.scsmsolutions.com/ freemanru (at) gmail (dot) com
-
Monday, June 25, 2012 2:32 PM
Thanks Anton,
Do you have any sample code to follow?
-
Monday, June 25, 2012 2:37 PMModeratorhttp://blogs.technet.com/b/servicemanager/archive/2010/10/04/using-the-sdk-to-create-and-edit-objects-and-relationships-using-type-projections.aspx
http://www.scsmsolutions.com/ freemanru (at) gmail (dot) com

