我在表单中有两个自定义表单A1,A2,A3和字段a1,a2,a3。我想用表单A1,A2中的自定义字段创建一个新项目。我们应该如何在POST URL中包含多个categoryID
/attask/api/v10.0/PROJ?fields=parameterValues&name=XXX&DE:a1=hello&DE:a2=hello1&categoryID=<A1/A2 category ID - How should i fill it.>
我尝试添加此参数,但没有成功categoryIDs=5d10971f0022b132ec67f6fb6c60b3a4,5d07244000060f86c04b49527f1
我收到以下错误“消息”:"APIModel V10_0不支持字段类别I(项目)“
发布于 2019-06-24 14:16:53
如果您尝试在尚未关联自定义字段的对象上设置自定义字段值(包含该字段的对象上没有表单),Workfront将自动附加相应的表单。如果这些表单是唯一使用您的字段的表单,那么您应该能够简单地设置字段值并使用它。
但是,如果您希望在不填写字段的情况下附加特定自定义表单,或者如果您具有与多个表单相关联的字段并希望确保附加特定表单,则必须首先在一个呼叫中附加表单,然后在另一个呼叫中更新字段。
要附加自定义表单,请执行以下操作:
PUT <Workfront URL.../<objectID?updates={objectCategories:[{categoryID:`"<custom form ID>`",categoryOrder:<order of form, starting with 0>,objCode:`"CTGY`"}]}
请注意,这将删除在此调用中未显式指定的任何表单(它不会追加),因此您需要捕获任何现有表单并重新应用它们。
发布于 2019-06-25 10:31:06
下面的API调用有效
POST <Workfront URL.../<object>?updates={objectCategories:[{categoryID:`"<custom form ID1>`",categoryOrder:<order of form, starting with 0>,objCode:`"CTGY`"},{categoryID:`"<custom form ID2>`",categoryOrder:<order of form, starting with 0>,objCode:`"CTGY`"}]],name:"`<object_name>`", DE:a1:"hello", DE:a2:"hello1"}
https://stackoverflow.com/questions/56735544
复制相似问题