0

Recently i was trying to get the items which are removed from the multilist field , suppose i have a multilist field and i added 3 items from left side to right side and saved and published those items with the related items checked . with the related items checked i was able to publish that 3 items which are selected in the multilist field also , but when i remove 1 item from the multilist field , then when i publish it with related items checked , only 2 items will be published which are selected in thet multilist , so in my case i need to publish that 3rd item also ( which is removed from th3 multilist ) , because there is a computed field created on that 3rd item and that field will only get reflected when the item is published . The computed field is having bool values true/false for the item selected in multilist/not selected in multilist. So how can i also publish that item which is removed from the field.?

1
  • If my understanding is right then you are looking to publish an item when you publish another item but no link between those two. You might be able to do this by extending <getItemReferences> pipeline. Commented Nov 5, 2019 at 22:22

1 Answer 1

1

When you don't select [don't move to right side] an item in multilist field then that won't be published even if you check "Publish related items".

Because publish related items basically runs <getItemReferences>. One of the pipeline inside that AddItemLinkReferences will look for the linked items in the published item. It won't find the multilist item if it is not selected / in right side.

Alternate options are you can add a pipeline in <getItemReferences>, where you can get all the items in a multilist whether they selected or not. [but may impact performance] Or you can write your own custom publish processor which does what you required.

But note, all the above mentioned options may impact performance slightly.

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.