Try our conversational search powered by Generative AI!

CreateWritableClone and Dynamic properties

Vote:
 

I have one dynamic property, let's call it globalProp.
I'm changing the content by code like this:

PageData NewPage = CurrentPage.CreateWritableClone();
NewPage.Property["globalProp"].Value = "Test";

But the dynamic property is always null (don't exists)... Even if I fill it with content manually in Edit mode.

Is the function CreateWritableClone not handling dynamic properties at all? And what to do if I want to manipulate those by code?

Regards, Andreas Ek, Internetfabriken.

#19737
Apr 30, 2008 19:10
Vote:
 
Google, my Google, found the solution on the EPiServer site Laughing 
DynamicProperty prop = DynamicProperty.Load(CurrentPage.PageLink, "globalProp"); 
prop.PropertyValue.Value = "Arne";
prop.Save();
http://sdk.episerver.com/library/cms5/index.aspx?ContentFrame=http://sdk.episerver.com/library/cms5/Developers%20Guide/Caching/Read-Only%20PageData%20Cache.htm
http://www.episerver.com/pages/505719/Presentations/07.%20Tech-Nice%20to%20know%20II.pdf
/ Andreas Ek, Internetfabriken.
#19740
Apr 30, 2008 19:57
Vote:
 

Hi,

This is not an answer to the original question but i'm hoping to get an answer to my question.

How get I get hold of the dynamically created form field names and values? e.g. I have form fields like FirstName,LastName, PostCode but when i look on the page source code the are named as random numbers.  I need their exact names and values in my Validator.

Kind regards

Szilvia

#205466
Jul 11, 2019 19:36
* 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.