I fixed this back in August, but I see I made a proper release. If you grab version 4.0.2 of podio-php you won't have this problem. :)
Cannot save an item because the first field is a calculation field
We're trying to add a letter in front of a field and save it right away. The library podio-php seems to not allow such a thing since the first field is a calculation field.
Here's the code:
$item = PodioItem::get_basic(ID_OF_THE_ITEM);//Temp
$item->fields['nom-du-projet']->values = $item->fields['nom-du-projet']->values.'a';
'hook' => true,
'silent' => true
The returned error:
Fatal error: Uncaught PodioBadRequestError: "Values cannot be set directly for field with id 75952210"
The field 75952210 is the calculation field which we are not trying to modify.
How should we proceed?
Please sign in to leave a comment.
Alright, I'll give it a shot as soon as I can! Efficient as always.
I am having a similar error "Uncaught PodioBadRequestError: "Values cannot be set directly for field with id 75999339"...
My item also starts with a calculation, but the field id 75999339 is not in my app...
The calculation that I start with references fields in other apps, but it doesn't appear to be that field either. I am using version 4.0.2 -- should this be working now?
David, yes this should be working. Get podio-php into debug mode so you can see exactly what's being sent back and forth: http://podio.github.io/podio-php/debug/
The number 75999339 must come from somewhere, the client library will not invent a number :)
hi, i'm also having the same error when i'm trying to update an item with save() but i'm using the podiokit for objective-c. was the fix not applied on the objective-c library?