I have a simple flow which is calling an Apex action whenever a QuoteLineItem is updated: enter image description here

This is my code:

public class RemoveHTMLTagsDealHub {
    @InvocableMethod(label='Remove HTML Tags')
    public static List<String> removeHtmlTags(List<String> richTextList) {
        List<String> plainTextList = new List<String>();

        for (String richText : richTextList) {

            richText = richText.stripHtmlTags();

        return plainTextList;

When I am running the flow for 1 record it works fine, but when multiple Items are updated together I am getting this error:

Error Occurred: The number of results does not match the number of interviews that were executed in a single bulk execution request.

Can anyone suggest a resolution?

Thanks :)

  • On the face of it, this code should work - the output list should have the same number of entries as the input list, and the values should be in the same order. Are you sure this is the full code? BTW, the documentation for String.stripHtmlTags indicates you should not use this method.
    – Phil W
    Sep 6, 2023 at 9:34
  • Could one of the inputs be a null string?
    – Phil W
    Sep 6, 2023 at 9:37


Browse other questions tagged .