1

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.

Jeremy Grand-Scrutton
  • 2,802
  • 14
  • 20
SDL Developer
  • 612
  • 1
  • 5
  • 15

3 Answers3

3

If you want to maintain date information between systems where migration is taking place then a good approach would be to add "created" and "modified" date fields as metadata to the items being migrated. You would then need to populate these fields with the appropriate values prior to exporting them from the source repository.

There is no other supported approach that I can think of.

Jeremy Grand-Scrutton
  • 2,802
  • 14
  • 20
1

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.

Chris Summers
  • 10,153
  • 1
  • 21
  • 46
  • My business / client requirement is that I want to keep created and modified date same as they were in my source repository ( as I my migrating content from an another repository). – SDL Developer Oct 15 '12 at 04:13
  • You really should post this sort of info in your question - it would make answering it much easier ;) Anyway, I've updated my answer in light of this new information. – Jeremy Grand-Scrutton Oct 15 '12 at 09:11
0

You can't modified and created through core srevice or any interface becuase tridion mainting the version.

you can set the created and revision date but core service will not change date.

Shekhar Gigras
  • 654
  • 3
  • 5