hi
I'm trying to set som properties on my page programmaically.
---
Example:
//pdc is a page data collection
((EPiServer.Core.PropertyString) pdc[j].Property["XXX"]).String = "XXX";
//... EPiServer.Global.EPDataFactory.Save (pdc[j], EPiServer.DataAccess.SaveAction.Publish, EPiServer.Security.AccessLevel.Read);
---
The new information is visible when viewing the page, but not in edit mode.
What have I done wrong?
EPi version: 4.31.0.47
Multilanguage on
best regards
/Stefan
hi everyone
Got this info from the support:
It should be possible to save a page programmatically.
What you have to do is save a version for common properties. It's done by setting page language to MultiLanguageRuntime.COMMONLANGUAGEID before saving it.
page.LanguageID = EPiServer.Util.MultiLanguageRuntime.COMMONLANGUAGEID;