5

I'm using CoreService to get a list of Components using Schema like described here. My problem is that I can't get the values of the Schema fields used in each Component. The list shows property Schema but I can't see the values set in the Component that uses that Schema. The Schema has two fields whose values are set per Component.

I need those How can I get them?

Here is the information retrieved

enter image description here

1 Answer 1

9

In your screenshot, notice how the "Content" attribute is null. For each component, you need to call:

ComponentData component = (ComponentData)coreServiceClient.Read(
                                  componentTcmId, new ReadOptions());

Now you can parse the component.Content to read the field values.

By the way, if you happen to have metadata fields as well, you will need to parse the component.Metadata to read the metadata field values.

0

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.