Thursday 24 April 2014

Sitecore Rule : Item Saved Actions not showing.

I am really fan of sitecore rule engine and discover some hidden gems for rule engine. I am bit surprise that has sitecore intentionally not added separate templates for each rule type or left it for developer to add themselves. but good things is it works with new template type with same field names...

Created new rule using template: /sitecore/templates/System/Rules/Rule  under /sitecore/system/Settings/Rules/Item Saved/Rules but actions are not showing any action from /sitecore/system/Settings/Rules/Item Saved/Actions  and showing from common actions under /sitecore/system/Settings/Rules/Common/Actions






 
 

Why? its not showing Item Saved/Actions and Showing Common Actions.

Solutions: when we create rule new there is default insert option is "rule" using which use /sitecore/system/Settings/Rules/Item Saved/Rules template with no source specified as below:



By adding new source with item saved path not going to solve the issue and this will applied to all rules and showing item saved action in all rules like item deleted, item created if you customised  pipeline. so this solution not going to work. after digging more and other rules action come to know that you need to create new template same as item insert option or content editor warning etc.

Step 1. Duplicate Rule template in /sitecore/templates/System/Rules/Rule named "Item Saved Rule".
Step 2. Add /sitecore/system/Settings/Rules/Item Saved to source field to rule field.
Step 3: Add Insert option to Rule item  as Item Saved
Step 4 Create rule desire rule under item saved/Rules with new template created in step 1.
Step 5 Add desire action folder or action to item saved/actions.
After Applying this you will see as below.


Sitecore........is...........Amazing........................