Try our conversational search powered by Generative AI!

Question about DataFactory events

Vote:
 
Hi, I would like to set a dynamic property from a normal page property. The purpose is to make it easier for the editor so that they don't have to care about dynamic properties. I'd like to do this on every startpage save. What event should I use? DataFactory.Instance.SavedPage doesn't seem to work, the event doesn't fire when I click Save or Save and view. However if I use DataFactory.Instance.PublishedPage it works fine when I click Save and publish. Code of what I'm trying to achieve: PropertyData prop; DynamicProperty dynProp; // Site Scheme prop = e.Page.Property["SiteScheme"]; if (prop != null && !prop.IsNull) { dynProp = DynamicProperty.Load(e.Page.PageLink, "GlobalSiteScheme"); dynProp.PropertyValue.Value = prop.Value; dynProp.Override = true; dynProp.Save(); }
#15850
Nov 02, 2007 10:06
Vote:
 
Hi Mattias! A bit late answer but do you really want to update the dynamic property when an editor only saves a start page? As the dynamic propeties go live directly you probably want to use the published-event to update the dynamic properties.
#16490
Nov 28, 2007 12:10
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.