4

I want to rename thousand of Components based on a Schema. I am trying to build a Core Service application. I am able to get all the Components, but I am not able to change the title. I see several post to change the fields but not the title. Is there any other better way to change the Component Title?

1 Answer 1

8

You can modify the system title of a component by simply using 'Title' property of the ComponentData object.

For example:

ComponentData component = (ComponentData)coreServiceClient.Read("tcmuri", defaulReadOptions); component.Title = "new title"; component = (ComponentData)this.coreServiceClient.Save(component, new ReadOptions()); coreServiceClient.CheckIn(id: component.Id, readBackOptions: defaulReadOptions); component = (ComponentData)this.coreServiceClient.Save(component, new ReadOptions());

Just found an example also on SDL Docs: https://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v5/GUID-AAA1BE79-4EB0-4001-9692-400589A52EF0

2
  • Thanks @shahid, it helped:) Commented May 23, 2019 at 14:05
  • @NeeleshRaghuvanshi nice, happy coding! Commented May 24, 2019 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.