Example of the NotifyNewDataWorkset Notification
The following code is an example usage of the NotifyNewDataWorkset notification:
// Trap an incoming change to the field value to do some flagging.
this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_NEW_DATA_WS"),
function (propSet){
var field = propset.GetProperty(consts.get("SWE_PROP_NOTI_FIELD"));
if (field === "Discount Percentage"){
var childPS = propSet.GetChildByType (consts.get("SWE_PROP_FIELD_VALUES"));
var value;
CCFMiscUtil_StringToArray
(fieldSet.GetProperty(consts.get("SWE_PROP_VALUE_ARRAY")), value);
if (parseFloat(value) > 20){
// Greater than 20% discount? Something fishy!
this.SetProperty ("flagCustomer", true);
}
}
});