我正在尝试创建一个具有多个引用的关系字段的项目,如下所示。
$collection = new PodioCollection(array(
new PodioItem(array('item_id' => 425989858)),
new PodioItem(array('item_id' => 425987845))
));
$response = PodioItem::create("16748745", array('fields' => array(
"130415123" => "+13334445552",
"130415337" => $collection
)));
创建项目时显示错误 PodioBadRequestError:“无效值 null (null):必须是范围”。我在这个应用程序中只有这两个字段。
我也遇到了与单个引用相同的错误。
$response = PodioItem::create("16748745", array('fields' => array(
"130415123" => "+13334445552",
"130415337" => array('item_id' => 425989858)
)));
有什么帮助吗?
最佳答案
这个应该可以工作
$response = PodioItem::create("16748745", array('fields' => array(
"130415123" => "+13334445552",
"130415337" => array(425989858, 425987845)
)));
我已经针对 Ruby 代码进行了测试,效果很好:)
created_item = Podio::Item.create(app_id,
'fields' =>
{'title' => 'just for test',
'relationship' => [item_1_id, item_2_id] })
关于api - Podio Api - 创建项目错误 - "Invalid value null (null): must be Range",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39577410/