我在看錯誤的屬性。請求屬性以下
uri(Unique Identifier):
reqEndDate(Date of Final Request):
reqFrequency(Frequency):
reqFrequencyType(Frequency Type):
reqName(Request Info):
reqNotes(Notes):
reqRequestDate(Date Needed):
reqRequestor(Requested By):
和代碼是
public void AddFileRequest(string FileUri,string RequestorUserId, DateTime DateNeeded)
{
List<InputProperty> properties = new List<InputProperty>();
InputProperty property = new InputProperty();
property.Name = ReqRequstor;
property.Val = GetUserUri(RequestorUserId);
properties.Add(property);
property = new InputProperty();
property.Name = ReqRequestDate;
property.Val = DateNeeded.ToString();
properties.Add(property);
ShortcutRecordUri uri = new ShortcutRecordUri();
uri.Uri = FileUri;
uri.IsForUpdate = true;
CreateChildItem create = new CreateChildItem();
create.ChildObjectType = ObjectTypeRequest;
create.Items = properties.ToArray();
TrimRequest request = new TrimRequest();
request.Items = new Operation[] { uri, create };
ExecuteRequest(request);
}