- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
This post will explain on how you can generate a dynamic rule base for an Order Guide of a Service Catalog.Suppose you have four options given to you in an Order Guide form, A,B,C and D. You will have to map them to their respective Catalog Items in the Rule base so that when you click on "Choose Options" you get a form with all these 4 items(supposing you have checked all the 4 options). Below, I will explain you a way to automate the rule base,using a onSubmit script, and a Script Include.This process will check if the Rule corresponding to an option checked is already there in the rule-base,and if it is not present will add one. Mind you this happens for every onSubmit of the order guide page.
Introduction: The rule base for an order guide is stored in a table called, sc_cat_item_guide_items. The condition is stored in variable : condition and the variable that you are mapping in the rule-base is stored in the variable named variable.
I had the freedom of writing the sys_ids of the options selected because, i myself created the options using my own UI page. The details of what the UI page is for another day. My onsubmit will write the SYS_ID's of all the options selected to a Single line text(Comma separated). Now from my onSubmit will call this script include which will take the sys_ids and insert corresponding records into Rule-base table.
You can extend this as well to send the Variable name you are mapping in the Rule-base if you are having many order guides and planning to have a dynamic rule-base.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.