Call to undefined method PodioItemFieldCollection::as_json()
Hi !
I have this issue Call to undefined method PodioItemFieldCollection::as_json() when I run this test code :
$name = "HelloWorld";
$app_id = xxxxxxxxx;
$LeadInfo = new PodioItemFieldCollection(array(
new PodioTextItemField(array("external_id" => "company-name", "values" => $name))
));
PodioItem::create($app_id, $LeadInfo);
Any idea ?
Thank you !
Angelo
-
Hi Angelo,
Please take a look at the documentation: http://podio.github.io/podio-php/items/#create-item
It looks like you should call `create` like this:
PodioItem::create($app_id, array("fields" => $LeadInfo))
Best,
Andreas -
Hi Andreas !
Thanks for your precious help !
Looks like there is two ways to create PodioItem : the one you describe and also the one explain in the documentation.
It worked fine with PodioContact/PodioEmbed but until now I did not succeed with PodioItem...
What you told me did the job !
Thanks again !
Best,
Angelo
Please sign in to leave a comment.
Comments
3 comments