0

enter image description here

The above action is configured with parameters. How can get the parameter value in WorkflowPipelineArgs?

args.parameters returning the null value.

1 Answer 1

1

You can use args.ProcessorItem.InnerItem to find the current Sitecore Item and then from this Item, you can access any field of that item. So, this is your process method for WorkflowAction class:

public void Process(WorkflowPipelineArgs args)
        {
            CreateContext(args);
        }

and then in this context method, you can use this args to fetch Sitecore Item:

private void CreateContext(WorkflowPipelineArgs args)
        {
            Item _innerItem = args.ProcessorItem?.InnerItem;
             NameValueCollection _params = WebUtil.ParseUrlParameters(_innerItem?["parameters"] ?? string.Empty);
        }
1
  • 1
    Thank you so much. Already found the solution. Anyway, this is the correct answer to the question. Feb 11, 2022 at 17:23

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.