【发布时间】:2020-06-19 11:55:27
【问题描述】:
我正在尝试更新作为子项目的自定义字段。这就是我所在的位置和结果。
string costCode= "DX Piping";
dynamic timesheet = new JObject();
timesheet.id = tsID;
timesheet.start = isoDate;
//Need to update custom field:247513 with the value in costcode should be another jobject?
timesheet.customfields["247513"] = costCode;
timesheet.end = isoDate;
这适用于 Postman。
"data":
[
{
"id": 45037255,
"end": "2020-06-17T14:00:00-04:00",
"start": "2020-06-17T12:00:00-04:00",
"customfields": {
"247513": "DX Piping"
}
}
]
}
这会导致错误:无法对空引用执行运行时绑定。 感谢观看
【问题讨论】:
-
你能给我们所有的代码吗,我不认为问题来自你如何我们
-
问题是自定义字段的格式。它是否正确?没有该行,其他代码可以正常工作。它是一个 JObject() 类型。我会发布更多。