Question

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

Était-ce utile?

La solution

There's a bit of a tutorial here: https://developers.podio.com/examples/items

The App Reference field just takes an array of item_ids as it's value so you can do:

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

Provided that name is the external_id of your app reference field!

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top