1

We have try to find all items under treelist field.

Example

$rawIds = [Sitecore.Data.Fields.MultilistField]$page.Fields["Sub Category Pages"]

Here getting $rawIds as null.

Please note here "Sub Category Pages" is TreeList Queryable field. If any field type is mutlilist then we are getting data.

Kindly suggest.

1 Answer 1

1

As far as I know, TreeList Queryable is not a built-in Sitecore field type.

Maybe there is something missing while mapping custom field types to MultilistField.

You can map value on your own using:

$rawIds = [Sitecore.Data.ID]::ParseArray($page["Sub Category Pages"])
2
  • Thanks Marek. Still am getting null with suggested code. This is custom field which inherit Sitecore.Shell.Applications.ContentEditor.TreeList. Commented May 24, 2021 at 13:44
  • Are you sure you don't have any typo in field name? And that you're checking right language version/right database, etc? What is the output of $page["Sub Category Pages"]?
    – Marek Musielak
    Commented May 24, 2021 at 13:56

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.