Search code examples
tridiontridion-2011

Tridion Core Service: How to update system properties of component/ multimedia component


I have a requirement where I need to update system properties (mainly created & modified date) of component / multimedia component. But while creating component I can access only Title property through which I can set name of component, so is there a way to update created and modified date through code as well.

In most of the repositories like Filenet etc system properties are not directly editable but after some configuration changes, system properties are also editable.

In SDL Tridion too after changing configuration file we can make other system properties editable? If yes then where exactly I need to do changes?

Below is the code I'm using to create a component:

core_service.ServiceReference1.SessionAwareCoreService2010Client client = 
    new SessionAwareCoreService2010Client();

client.ClientCredentials.Windows.ClientCredential.UserName = "myUserName";
client.ClientCredentials.Windows.ClientCredential.Password = "myPassword";

client.Open();

ComponentData component = (ComponentData)client.GetDefaultData(
                                     ItemType.Component, folderUri);
component.Title = targetFileName;
component.ComponentType = ComponentType.Normal;

Please suggest.


Solution

  • As stated by @Jeremy, these are read only properties. It is very rare that these values will ever be used for something other than providing information for editors.

    Perhaps if you can explain you business requirments, someone can provide an alternative solution.