Persist existing data while creating writable clone

Vote:
 

CreateWritableClone() creates an empty object.

Can we persist the existing data while creating writable clone of the page.

Out of 10 properties on a page i just want to update 5 properties at runtime and i want the data of rest 5 properties to persist while creating writable clone.

#150516
Jun 21, 2016 14:42
Vote:
 

You can call .CreateWritableClone() on current page. That should works as you describe above. 

#150521
Jun 21, 2016 15:16
Vote:
 

Calling CreateWritableClone() will give you an untyped PageData object, but you can cast it back to your type like var writeablePage = page.CreateWritableClone() as YourContentType. Not sure if this was your issue, but CreateWritableClone() doesn't remove or empties any properties.

#150537
Jun 21, 2016 20:30
* 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.