I'm developing an extension which saves some Page data (on the Save/SaveClose/SaveNew event) to the app_data
table throught Core Service Client with the follow code:
Byte[] byteData = Encoding.Unicode.GetBytes(applicationData);
ApplicationData appData = new ApplicationData
{
ApplicationId = "AppData:Page",
Data = byteData,
TypeId = "-64"
};
_client.SaveApplicationData(tcmElement, new[] { appData });
It works fine, but when I reload the Page the data that I get is wrong, because is data stored in a previous version of the item in the app_data
table...
I read the data following this code:
ApplicationData appData = _client.ReadApplicationData(tcmElement, "AppData:Page");*
Do you know what could be the problem? Is there any way to get a specific version of the data in app_data
?
Thanks in advance!