More in this section
Blogs RSS feed

Workflow Rejection for Dynamic Module Items Using the Sitefinity API

by Stanislav Velikov

When moving Sitefinity module builder items through the workflow, the standard method used is to call.

It is the extension method SetWorkflowStatus which allows you to state the status of each item to Published, Draft, AwaitingApproval, AwaitingPublishing, Rejected.

dynamicItem.SetWorkflowStatus(testsItem, dynamicModuleManager.Provider.ApplicationName, "Published");


The case with rejected, however, doesn`t support the addition of a rejection reason when rejecting an item sent for approval through code. While this is available through the UI and the rejection reason can be added, using SetWorkflowStatus doesn`t support it.

For this purpose until this feature is implemented and SetWorkflowStatus supports addition of a rejection reason, you can use the custom class that can be downloaded from here and provides customization of the SetWorkflowStatus method.

To use the class, call the static method  IWorkflowExtensionsCustom. SetWorkflowStatus

IWorkflowExtensionsCustom.SetWorkflowStatus(testsItem, dynamicModuleManager.Provider.ApplicationName, "Rejected",new CultureInfo("fr"),"rejection reason: fix spelling");



Leave a comment
  1. Scott Rozman May 06, 2014

    Hello Stanislov-

    I was using a version of the custom class you shared above, but now with 7.0 the ApprovalTrackingRecordMap is obsolete.

    (Hope I typed that correctly. I cannot paste into this comment!)

    Is there a simpler do this / would you be willing to update this custom class?

    thanks in advance.

  2. sdfoijdosf Apr 14, 2018                                                    Thanks for sharing.I found a lot of interesting information here. A really good post, very thankful and hopeful that you will write many more posts like this one.
  3. Albina Apr 24, 2018
    Your blog provided us with valuable information to work with. Each &  every tips of your post are awesome. Thanks a lot for sharing. Keep blogging,
  4. adv May 21, 2018
    If you like to be a good chef then follow the address ,i know you all get satisfied and also get the recipe of special items papas sushiria know here to cook burger,pizza,and lots of fast food.
  5. Hasan Jun 28, 2018
    I Thinks this is nice post. Keep it Up . Thanks Always help others. Cheers

    Leave a comment