I have a page with status "Not ready". It has only one version. I load one by calling DataFactory.GetPage(reference);
Loaded page has not setted custom fields. But I expect to load all data the same as I load the latest version.
Do I have wrong expectation or it's a bug of EPi Server. Why I can not to load data properly for unpublished page without workId?
Hi, that is a quirk in the API, if you want to load data from a page that is not published yet you need to tell CMS to look for any version it can found (latest version since there is nothing published). You do this by constructing a new PageReference where you set anyversion=true. Like this "new PageReference(id,true)", this method causes database lookups so use with caution or as a fallback for not published pages.