2

What I am doing

  • Creating a segmented list form an existing contact list
  • On create and update of the segmented List I need to write some custom logic for display name and security
  • I need to tap into the Sitecore.ListManagement.ContentSearch.Pipelines to call my own custom code

I am trying to use the pipeline as shown below but the it is not working. Am I missing/using the wrong pipeline?

<listManagement.CreateList>
    <processor
        type="XXX.XXX.Web.Helper.AccessPermissions, XXX.XXX.Web"
        patch:instead="*[@type='Sitecore.ListManagement.ContentSearch.Pipelines.CreateList.CreateContactList, Sitecore.ListManagement.ContentSearch']" resolve="true">
    </processor>
  </listManagement.CreateList>
  <listManagement.UpdateList>
    <processor
        type="XXX.XXX.Web.Helper.AccessPermissions, XXX.XXX.Web"
        patch:instead="*[@type='Sitecore.ListManagement.ContentSearch.Pipelines.UpdateList.UpdateContactList, Sitecore.ListManagement.ContentSearch']" resolve="true">
    </processor>
  </listManagement.UpdateList>
</pipelines>

Sitecore version : 9.0 Update 2

0

Opened up a sitecore support ticket and turns out there is no easy way to customize the name and security setting.

  • When you create a segmented list from the existing list and "save" the list, the background js code send out request to the "segmentedListController" (sitecore.ListManagement.Services.dll).
  • This controller will then ask Sitecore to create the list item based on the entity data.
  • The name of the list is "hard coded" with the method below: ItemUtil.ProposeValidItemName(FormattableString.Invariant($"{entity.Name}-{guid}")), ContextCulture, entity.Name, DateUtil.ToUniversalTime(DateUtil.IsoDateToDateTime(entity.Created, DateTime.UtcNow)), entity.CreatedBy ?? Context.User.Name)

Also

<listManagement.CreateList>
<processor
    type="XXX.XXX.Web.Helper.AccessPermissions, XXX.XXX.Web"
    patch:instead="*[@type='Sitecore.ListManagement.ContentSearch.Pipelines.CreateList.CreateContactList, Sitecore.ListManagement.ContentSearch']" resolve="true">
</processor>

Older Sitecore version, eg: Sitecore 8.1, has this assembly and pipeline. This processor is called when you create contact list from csv file. So creating segmented list from List manager won't trigger this pipeline.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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