0

To make my Podio system perfect, I need items to be created automatically based on when another item is created.

My layout: So I have a "Main" app, a "Copy" app, a "Translations" app and a "Links" app. Each one is a different deliverable from a different team, and would be immensely useful to be split up in this way.

Case example: When a user creates a new "Main" item, a "Copy", "Translations", "Links" items are created automatically and are referenced in my "Main" item.

I have the items being created just fine - but it's the references that I'm stuck on!

I believe I need to grab the response from PodioItem::create and save the created item_id as the reference on my "Main" item.

How would this be possible?

I should mention that my PHP is triggered as a hook within podio - on item.create of my Main app.

Full PHP code pasted here: http://pastebin.com/S7NR72tH

4

1 回答 1

2

这里有一些教程:https ://developers.podio.com/examples/items

App Reference 字段仅采用 item_ids 数组作为其值,因此您可以执行以下操作:

PodioItem::create("#######", array(
  'fields' => array(
    'name' => array((int)$_POST['item_id'])
  )
));

前提name是您的应用参考字段的 external_id!

于 2014-02-27T14:33:02.333 回答