You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disclaimer: I do understand that the podio api might be a limitation on this one.
I ran into this problem, that by only having AppItemId and not the global ItemId I can't run the update command so easily.
I made it out that I need to fetch the item first by calling GetItemByAppItemId(appId, appItemId) and then using the ItemId from the returned object.
When the returned item is big I couldn't even use the returned object in updating and had to extract the ItemId and make a new object with the value like so (although I agree that this is better when updating 1 field, it shouldn't be forced):
var item = new Item
{
ItemId = podio.ItemService.GetItemByAppItemId(appId, appItemId).ItemId
};
item.Field<TextItemField>("my_field").Value = "-1";
podio.ItemService.UpdateItem(item, null, null, true);
Which could be done in the same way as in geting by app item id's
var item = new Item {AppItemId = appItemId};
item.Field<TextItemField>("my_field").Value = "-1";
podio.ItemService.UpdateItem(appId, item);
That would avoid the unnecessary GetItem call, but would require additional explanation that AppItemId is a required field of Item when calling this method.
Cheers!
The text was updated successfully, but these errors were encountered:
Disclaimer: I do understand that the podio api might be a limitation on this one.
I ran into this problem, that by only having
AppItemId
and not the globalItemId
I can't run the update command so easily.I made it out that I need to fetch the item first by calling
GetItemByAppItemId(appId, appItemId)
and then using theItemId
from the returned object.When the returned item is big I couldn't even use the returned object in updating and had to extract the
ItemId
and make a new object with the value like so (although I agree that this is better when updating 1 field, it shouldn't be forced):Which could be done in the same way as in geting by app item id's
That would avoid the unnecessary
GetItem
call, but would require additional explanation thatAppItemId
is a required field ofItem
when calling this method.Cheers!
The text was updated successfully, but these errors were encountered: