0

次のコードがあります: ReportDetails には 7 つの異なる属性があります。しかし、このコードは機能していないようで、エラーはありません。

AttributeGroup DocTypeGrp = new AttributeGroup();
DocTypeGrp = docManClient.GetCategoryTemplate(ref otAuthentication, 12456);
StringValue doc = new StringValue();
doc.Values = new string[1];
doc.Values[0] = "Report";
DocTypeGrp.Values[0] = doc;

AttributeGroup rptDetailsGrp = docManClient.GetCategoryTemplate(ref otAuthentication, 45632);
StringValue rptGroup = new StringValue();
rptGroup.Values = new string[1];
rptGroup.Values[0] = string.Empty;
// rptGroup.Values[1] = "2012";
rptDetailsGrp.Values[0] = rptGroup;
rptGroup = new StringValue();
rptGroup.Values = new string[1];
rptGroup.Values[0] = "2012";
rptDetailsGrp.Values[1] = rptGroup;


Node existingNode = docManClient.GetNode(ref otAuthentication, reportFolder.ID); // Set Node
Metadata metadata = new Metadata(); //Create Metadata object
metadata.AttributeGroups = new AttributeGroup[] { DocTypeGrp , rptDetailsGrp };
existingNode.Metadata = metadata; // Set the Metadata objects back onto the node

docManClient.UpdateNode(ref otAuthentication, reportFolder);//Update Node

どんな助けでも本当に感謝します。

4

1 に答える 1

0

カテゴリをexistingNodeオブジェクトに追加しているため、ノードを更新してreportFolderいるときに、カテゴリを持たないパスを渡しています。

以下のようにコードを変更すると、問題が解決するはずです

docManClient.UpdateNode(ref otAuthentication, existingNode);//Update Node
于 2016-11-27T12:59:56.630 に答える