In Fuji, a system property named glide.sc.remove_inactive_cat_items_from_cart was added. If this property is set to True and you have an Item in a cart that you make inactive, a process runs to remove any cart items that are associated with that inactive item.

There is a scenario where when this property is set to True initially, it does not remove any existing inactive cart items so they can still be ordered.

Steps to Reproduce 

  1. Ensure that the property glide.sc.remove_inactive_cat_items_from_cart is set to false.
  2. As any user, go to the service catalog.
  3. Select an item that is currently active.
  4. Add the item to your cart. (Do not check out at this point.)
  5. Go the item record of the item you added.
  6. Set the item to inactive (Active = false)
    The item should remain in your cart because the property is still false.
  7. Change the glide.sc.remove_inactive_cat_items_from_cart property to true.
    The item remains in the cart because there is nothing to check against already inactive items.
  8. Go back to the service catalog.
    You should see the widget for your cart.
  9. Order the item you added that should be inactive.
    You are still able to order this inactive item even though the property is set to true.


Create a business rule with the following properties:

Table: System Property [sys_properties]

When: After [Insert & Update]

Filter: Name is glide.sc.remove_inactive_cat_items_from_cart

  AND Value is True



(function executeRule(current, previous) {

    var scCartItemGr = new GlideRecord('sc_cart_item');

    var gAppCart = new GlideappCart();
    while (scCartItemGr.next()) {
        if ((scCartItemGr.cat_item.active+'') == 'false')
    gs.addInfoMessage(gs.getMessage('All inactive catalog items have been removed from all shopping carts'));

})(current, previous);


This script runs when the glide.sc.remove_inactive_cat_items_from_cart property is set to true. It removes all inactive catalog items that have been added to the cart of any user.

Note: This workaround business rule should be removed when upgrading to a system version where this issue has been fixed, otherwise a duplicate will be created.

Related Problem: PRB638518

Seen In

Fuji Patch 10
Fuji Patch 12 Hot Fix 1

Fixed In


Associated Community Threads

There is no data to report.

Article Information

Last Updated:2016-05-06 10:58:01