Bookshelf Home | Contents | Index | PDF |
Siebel Advisor API Reference > Siebel Advisor API Examples > Example of Adding Custom Behavior with a Callout PointThis example adds custom behavior to be executed before the configuration engine runs. Using values from the Feature tables for selected rows, an input selection value is calculated and set. function COP_BeforeConfiguration(privateArg1, privateArg2,instanceName,configData,featureData, privateArg3,inputState,privateArg4,privateArg5) { // get the current selection for the packing method var pmVal=inputState.GetValue("PACK_METHOD",instanceName); // if the packing method selection is to use cartons, // calculate and set the number of cartons if (featureData.GetTable("PACK_METHOD").GetRowCode(pmVal)== "CARTON") { var eggSel=inputState.GetValue("EGGS",instanceName); var total=featureData.GetTable("EGGS").GetTableCell(eggSel, // calculate how many cartons are needed var eggsPerCarton= featureData.GetTable("PACK_METHOD").GetTableCell(pmVal, var numCartons=parseInt(total/eggsPerCarton); if (total%eggsPerCarton!=0) numCartons++; |
Siebel Advisor API Reference |