Siebel CRM Configuring Siebel Open UI Siebel Innovation Pack 2015 E52417-01 |
|
Previous |
Next |
View PDF |
This topic describes notifications that Siebel Open UI supports. It includes the following information:
For more information about configuring Siebel Open UI to use notifications, see "AttachNotificationHandler Method".
Table B-1 describes the notification types that Siebel Open UI supports. For more information, see "New Notification User Interfaces".
Table B-1 Notification Types That Siebel Open UI Supports
Notification | Type | Description |
---|---|---|
NotifyBeginNotifys |
SWE_PROP_BC_NOTI_BEGIN |
Notifies the client business component that the request that Siebel Open UI sent to the Siebel Server resulted in at least one notification from a business component. |
NotifyStateChanged |
SWE_PROP_BC_NOTI_STATE_CHANGED |
Specifies a top-level notification for more than one state change that occurs in the business component level. Siebel Open UI uses the following properties to identify the change and to get the data associated with the change:
Siebel Open UI can provide summary or detailed state information. For more information, see "NotifyStateChanged Notification Type". |
NotifyGeneric |
SWE_PROP_BC_NOTI_GENERIC |
Identifies the predefined and custom notifications that the Siebel application must send. Siebel Open UI addresses most predefined generic notifications to a particular applet. You can use NotifyGeneric to get the exact type for a generic notification. Siebel Open UI provides actual information of the changes as an encoded argument set. |
NotifyNewSelection |
SWE_PROP_NOTI_SELECTED |
Notifies the client business component that a change occurred in the selection status. Siebel Open UI calls NotifyNewSelection two times for each selection status change:
You cannot use NotifyNewSelection with a multi-select. You can use the following syntax in the property set that Siebel Open UI sends: SWE_PROP_BC_NOTI_ACTIVE_ROW = index SWE_PROP_NOTI_SELECTED = Boolean where:
|
NotifyNewActiveRow |
SWE_PROP_BC_NOTI_NEW_ACTIVE_ROW |
Notifies the client business component that a change occurred on an active row of the corresponding business component on the Siebel Server. Siebel Open UI usually uses NotifyNewSelection with NotifyNewActiveRow. You can use the following syntax: SWE_PROP_BC_NOTI_ACTIVE_ROW = row where:
|
NotifyDeleteRecord |
SWE_PROP_BC_NOTI_DELETE_RECORD |
Notifies the business component in the client that Siebel Open UI deleted a record from the current set of records on the Siebel Server. Siebel Open UI might use this notification two times for a single record deletion. You can use the following syntax in the property set that Siebel Open UI sends: SWE_PROP_BC_NOTI_ACTIVE_ROW = index bUp = Boolean where:
For an example usage of this notification, see "Customizing the Presentation Model to Handle Notifications". |
NotifyDeleteRecordSet |
SWE_PROP_BC_NOTI_DELETE_WORKSET |
Notifies the business component in the client that Siebel Open UI is deleting a record from the current set of records in the client. Does not correspond to a method invoke. Siebel Open UI sends a separate notification for each record that it deletes. You can use the following syntax in the property set that Siebel Open UI sends: index:index NumRows/nr:number where:
For more information, see "Using Notifications with Operations That Call Methods". |
NotifyInsertWorkSet |
SWE_PROP_BC_NOTI_INSERT_WORKSET |
Notifies the business component in the client that Siebel Open UI is inserting a new record in the current set of records in the client. You can use the following syntax in the property set that Siebel Open UI sends: index:index_value SWE_FIELD_VALUE_STR:child SWE_PROP_VALUE_ARRAY:array where:
For more information, see "Using Notifications with Operations That Call Methods". |
NotifyNewData |
SWE_PROP_BC_NOTI_NEW_DATA |
Notifies the business component in the client that Siebel Open UI is modifying the current set of records. Siebel Open UI sends this notification only if it modifies a record. It does not send this notification if it only modifies a field value. |
NotifyNewPrimary |
SWE_PROP_BC_NOTI_NEW_PRIMARY |
Sets the primary record in a multi-value group. The RepopulateField notification calls NotifyNewPrimary. |
NotifyNewRecord |
SWE_PROP_BC_NOTI_NEW_RECORD |
Notifies the client business component that Siebel Open UI is creating a new record in the current set of records on the Siebel Server. You can use the following syntax in the property set that Siebel Open UI sends: SWE_PROP_BC_NOTI_ACTIVE_ROW = index bInsertBefore = Boolean where:
For a similar usage of this notification, see "Customizing the Presentation Model to Handle Notifications". |
NotifyNewRecordData |
SWE_PROP_BC_NOTI_NEW_RECORD_DATA |
Sets the do populate flag. |
NotifyNewDataWorkSet |
SWE_PROP_BC_NOTI_NEW_RECORD_DATA_WS |
Updates a record in the current set of records. |
NotifyNewFieldData |
SWE_PROP_BC_NOTI_NEW_FIELD_DATA |
Notifies the client business component that Siebel Open UI modified a field value on the Siebel Server, and that Siebel Open UI communicated this modification to the client through the NotifyNewDataWorkset notification. You can use the following syntax in the property set that Siebel Open UI sends: SWE_PROP_NOTI_FIELD = field where:
|
NotifyNewDataWorkset |
SWE_PROP_BC_NOTI_NEW_DATA_WS |
Notifies the client business component of a field value that Siebel Open UI modified for a field that resides on the Siebel Server. You can use the following syntax in the property set that Siebel Open UI sends: SWE_PROP_NOTI_FIELD = field SWE_PROP_FIELD_VALUES = child where:
You can use the following syntax in the child property set: SWE_PROP_FIELD_ARRAY:string1 SWE_PROP_VALUE_ARRAY:string2 where:
|
NotifyNewFieldList |
SWE_PROP_BC_NOTI_NEW_FIELD_LIST |
Refreshes the entire view internally. |
NotifyNewRecordDataWS |
SWE_PROP_BC_NOTI_NEW_RECORD_DATA_WS |
Updates the values in the record set. Siebel Open UI updates the dirty flag during previous notifications. |
NotifyChangeSelection |
SWE_PROP_BC_NOTI_CHANGE_SELECTION |
Sets the update conditionals flag and the row counter. |
NotifyEndNotifys |
SWE_PROP_BC_NOTI_END |
Notifies the client business component that Siebel Open UI is ending the notification, and that no more server notifications exist for the current transaction. |
NotifyBeginQuery |
SWE_PROP_BC_NOTI_BEGIN_QUERY |
Notifies the client business component that Siebel Open UI started a query on the business component on the Siebel Server. |
NotifyNewQuerySpec |
SWE_PROP_BC_NOTI_NEW_QUERYSPEC |
Siebel Open UI uses the NotifyNewQuerySpec notification if the user refines a query. If the business component search specification is empty, then NotifyNewQuerySpec clears all field search specifications. |
NotifyNewFieldQuerySpec |
SWE_PROP_BC_NOTI_NEW_FIELD_QUERYSPEC |
Notifies the client business component that Siebel Open UI is doing one of the following to query the fields of the current business component on the Siebel Server:
This situation can occur through a predefined or custom configuration, or in reply to a query that the user performs. You can use the following syntax in the property set that Siebel Open UI sends: SWE_PROP_NOTI_FIELD = fieldSWE_PROP_VALUE = search specification" where:
|
NotifyEndQuery |
SWE_PROP_BC_NOTI_END_QUERY |
Notifies the client business component that Siebel Open UI is ending a query on the business component on the Siebel Server. This situation can occur if the ExecuteQuery method or the UndoQuery method runs. |
NotifyExecute |
SWE_PROP_BC_NOTI_EXECUTE |
Notifies the client business component that Siebel Open UI is running a business component on the Siebel Server. You can use the following syntax in the property set that Siebel Open UI sends: srt = sort specifications where:
|
NotifyScrollAmount |
SWE_PROP_BC_NOTI_SCROLL_AMOUNT |
Sets the scroll folder and the amount for a mobile swipe operation. |
NotifyPageRefresh |
SWE_NOTIFY_PAGE_REFRESH |
Updates the urltogo with the URL that Siebel Open UI uses to refresh a view. Siebel Open UI gets this URL from a subsequent executeurltoGo notification. |
It is recommended that you do not use some notifications with an operation that calls a method. For example, if the user paginates to the next page in a set of 10 records, and if you use NotifyInsertWorkSet with the method that calls this pagination, then Siebel Open UI will create 10 separate NotifyInsertWorkSet notifications.
Table B-2 describes the subtypes of the SWE_PROP_BC_NOTI_GENERIC type that the NotifyGeneric notification type uses. It includes the predefined and custom notifications that a Siebel application must send.
Table B-2 NotifyGeneric Notification Type
Sub Type | Description |
---|---|
SWEICanInvokeMethod |
Enables the refresh button. |
SWEICtlDefChanged |
Modifies the definition for a control. You can customize Siebel Open UI to dynamically modify the definition that a control uses. For example, modifying a definition from JavaScript text box to a JavaScript combo box. |
SWEIPrivFlds |
Specifies a list of private fields. For example, the Find controls that Siebel Open UI displays in a dialog box. A private field is a type of field that only allows the record owner to view the record. For more information, see Siebel Object Types Reference. |
SWEICanUpdate |
Specifies to display data-driven, read-only behavior. |
SWEICanNavigate |
If a list applet displays zero records, and if the user adds a new record, then the SWEICanNavigate subtype displays the drilldown links. |
SWEIRowSelection |
Sends the set of selected rows that exist in the current set of records to a list applet. You can use the following syntax in the decoded array: argsArray[0] = applet name argsArray[1-x] = value where:
|
SWEAInvokeMethod |
Adds an operation in the life cycle that the InvokeMethod method uses. For example, assume you configure an OK button in an association applet, and that this button closes a dialog box. You can use the SWEAInvokeMethod subtype to configure this button to make a subsequent call to the CreateRecord method if the user clicks OK. You can use the following syntax in the decoded array: argsArray[0] = applet argsArray[1] = method where:
For more information, see "InvokeMethod Method for Presentation Models". |
DeletePopup |
Deletes a popup applet. The DeletePopup subtype does not close an applet in the user interface. You can use ClosePopup to close an applet. |
SetPopupBookmark |
Sets the context for a popup bookmark to use the state of the parent applet that resides on the Siebel Server. |
GetQuickPickInfo |
Sends the values of a picklist to an applet. You can use the following syntax in the decoded array: argsArray[0] = placeholder argsArray[1] = view argsArray[2] = applet argsArray[3] = identifier argsArray[4] = control argsArray[5-x] = string where:
|
BegRow |
Sends the starting row that the Object Manager uses to display the current row in the client. You can use the following syntax in the decoded array: argsArray[0] = applet name argsArray[1] = value where:
|
GetCurrencyCalcInfo |
Gets a currency notification from the currency metadata. |
GetCurrencyCodeInfo |
Gets a currency notification from specific currency data. |
CloseCurrencyPickApplet |
Sends a notification to close a currency applet. |
ClosePopup |
Notifies an applet that Siebel Open UI is closing a popup that is currently open on this applet. You can use the following syntax in the decoded array: argsArray[0] = applet where:
|
Table B-3 describes the subtypes of the NotifyStateChanged type.
Table B-3 NotifyStateChanged Notification Type
Sub Type | Description |
---|---|
activeRow |
Identifies the active row of the business component. You can use ar (active row) to abbreviate activeRow. |
bCanDelete |
Returns a Boolean value that includes one of the following values:
You can use cd (can delete) as an abbreviation for bCanDelete. |
bCanInsert |
Returns a Boolean value that includes one of the following values:
You can use ci (can insert) as an abbreviation for bCanInsert. |
bCanInsertDynamic |
Returns a Boolean value that includes one of the following values:
You can use cud (can insert dynamic) as an abbreviation for bCanInsertDynamic. |
bCanMergeRecords |
Returns a Boolean value that includes one of the following values:
You can use cm (can merge) as an abbreviation for bCanMergeRecords. |
bCanQuery |
Returns a Boolean value that includes one of the following values:
You can use cq (can query) as an abbreviation for bCanQuery. |
bCanUpdate |
Returns a Boolean value that includes one of the following values:
You can use cu (can update) as an abbreviation for bCanUpdate. |
bCanUpdateDynamic |
Returns a Boolean value that includes one of the following values:
You can use cud (can update dynamic) as an abbreviation for bCanUpdateDynamic. |
bCommitPending |
Returns a Boolean value that includes one of the following values:
You can use cp (commit pending) as an abbreviation for bCommitPending. |
bDelRecPending |
Returns a Boolean value that includes one of the following values:
You can use dp (delete pending) as an abbreviation for bDelRecPending. |
bExecuted |
Returns a Boolean value that includes one of the following values:
You can use ex (executed) as an abbreviation for bExecuted. |
bHasAssocList |
Determines whether or not the business component is an association business component. An association business component is a type of business component that includes an intertable. |
bInMultiSelMode |
Returns a Boolean value that includes one of the following values:
You can use ms (multiselect) as an abbreviation for bInMultiSelMode. |
bInQueryState |
Returns a Boolean value that includes one of the following values:
You can use qs (query state) as an abbreviation for bInQueryState. |
bInverseSelection |
Returns a Boolean value that includes one of the following values:
You can use is (inverse selection) as an abbreviation for bInverseSelection. |
bNewRecPending |
Returns a Boolean value that includes one of the following values:
You can use np (new record pending) as an abbreviation for bNewRecPending. |
bNotifyEnabled |
Returns a Boolean value that includes one of the following values:
You can use n (enabled) as an abbreviation for bNotifyEnabled. |
NumRows |
Returns the number of rows that Siebel Open UI has currently identified. You can use nr (number of rows) as an abbreviation for NumRows. |
NumRowsKnown |
Returns the number of rows that Siebel Open UI has currently identified for a search specification. You can use nrk (number of rows known) as an abbreviation for NumRowsKnown. |
NumSelected |
Returns the number of rows that are currently in multiselect mode. You can use ns (number selected) as an abbreviation for NumSelected. |
This topic describes example usages of notifications.
The following code is an example usage of the NotifyBeginNotifys notification:
this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_DELETE_RECORD"), function (propSet){ // Change has occurred at server BC. Do something here: this.SetProperty ("Refresh_Renderer", true); });
The following code is an example usage of the NotifyNewSelection notification:
this.AttachNotificationHandler(consts.get("SWE_PROP_NOTI_SELECTED"), function (propSet){ if (propSet.GetProperty(consts.get("SWE_PROP_NOTI_SELECTED")) === "false") this.SetProperty ("rowBeingUnselected", propSet.GetProperty("SWE_PROP_BC_NOTI_ACTIVE_ROW")); } });
The following code is an example usage of the NotifyNewFieldData notification:
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 === "Customer Last Name"){ // Notify my extension that shows this value in a different way. this.SetProperty ("RefreshExtn", true); } }
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); } } });
The following code is an example usage of the NotifyNewData, NotifyInsertWorkSet, and NotifyDeleteRecordSet notifications:
// First let's check if there's any change to the client workset. this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_NEW_DATA"), function (){ // Yes indeed. this.SetProperty ("primeRenderer", true); }); // Now let's say our business is with the 4th record. We want to track if this record is replaced. // First we see if this 4th record is being deleted. this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_DELETE_WORKSET"), function (propSet){ if (propSet.GetProperty("index" === 3){// 3 because count starts at 0 if (propSet.GetProperty("nr") === 1 || propSet.GetProperty("NumRows") === 1){ if (this.Get("primeRenderer")){ this.Set("deleted", 4); } } } }); // Next to the insertion this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_INSERT_WORKSET"), function (propSet){ var underReplacement = this.GetProperty ("deleted"); if (this.Get("primeRenderer") && propSet.GetProperty("index") === this.GetProperty("deleted")){ // All conditions met. Now we'll get some info from what is being added. var childPS = propSet.GetChildByType (consts.get("SWE_FIELD_VALUE_STR")); var fieldArray; CCFMiscUtil_StringToArray (childPS.GetProperty(consts.get("SWE_PROP_VALUE_ARRAY")), fieldArray); this.SetProperty ("New_Name_Value", fieldArray[2]); this.SetProperty ("primeRenderer", false); } });
The following code is an example usage of the NotifyBeginQuery, NotifyNewFieldQuerySpec, and NotifyEndQuery notifications:
// Let's see a simple example involving all the three. First we will take up the query start. this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_BEGIN_QUERY"), function (){ // Query begins - The renderer will use this notification to show a bubble box having a number of choices. This might be driven off of a dropdown in the actual applet - we already have the choices. this.SetProperty ("showBubble", true); }); // Now we'll attach to Field Spec. If that dropdown has a pre default value, then we can highlight that choice in our bubble. this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_NEW_FIELD_QUERYSPEC"), function (propSet){ if (propSet.GetProperty(consts.get("SWE_PROP_NOTI_FIELD") === "Customer Type"){ var value = propSet.GetProperty(consts.get("SWE_PROP_VALUE"); var bubbleValues = this.Get (bubbleValueArray); this.SetProperty ("SetBubbleHighlightIndex", bubbleValues.indexOf(value)); } }); // Next the obvious. The death of the bubble. this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_END_QUERY"), function (){ this.SetProperty ("showBubble", false); });
The following code is an example usage of the NotifyEndNotifys notification:
this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_END"), function (){ // No more notifications. Mark for UI Refresh. this.SetProperty ("refreshUI", true); });
The following code is an example usage of the SWEIRowSelection notification:
this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_GENERIC"), function (propSet){ var type = propSet.GetProperty(consts.get("SWE_PROP_NOTI_TYPE")); if (type === "SWEIRowSelection"){ var argsArray; CCFMiscUtil_StringToArray (propSet.GetProperty(consts.get("SWE_PROP_ARGS_ARRAY"), argsArray); if (argsArray[6] === "1"){ this.SetProperty ("SixthRowSelected", true); } } });
The following code is an example usage of the BegRow notification:
this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_GENERIC"), function (propSet){| var type = propSet.GetProperty(consts.get("SWE_PROP_NOTI_TYPE")); if (type === "BegRow"){ var argsArray; CCFMiscUtil_StringToArray (propSet.GetProperty(consts.get("SWE_PROP_ARGS_ARRAY"), argsArray); this.SetProperty ("beginRow", parseInt(argsArray[1])); } });
The following code is an example usage of the GetQuickPickInfo notification:
this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_GENERIC"), function (propSet){ var type = propSet.GetProperty(consts.get("SWE_PROP_NOTI_TYPE")); if (type === "GetQuickPickInfo"){ var argsArray; CCFMiscUtil_StringToArray (propSet.GetProperty(consts.get("SWE_PROP_ARGS_ARRAY"), argsArray); if (argsArray[5] === "MyValue"){ // Ah so the dropdown contains a value that we dont like.. // Let us disable it. this.SetProperty ("disablePick", true); } } });
The following code is an example usage of the ClosePopup notification:
this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_GENERIC"), function (propSet){ var type = propSet.GetProperty(consts.get("SWE_PROP_NOTI_TYPE")); if (type === "ClosePopup"){ // The below is just an example. PM's should not alert anything. Leave that to the PRs. alert ("Make sure you have collected all details. You next operation will save the record!"); } });
The following code is an example usage of the SWEAInvokeMethod notification:
this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_GENERIC"), function (propSet){ var type = propSet.GetProperty(consts.get("SWE_PROP_NOTI_TYPE")); if (type === "SWEAInvokeMethod"){ if (argsArray[1] === "NewRecord"){ // Ah so there's going to be a new record that has happened as a chain. // Let's set a property so that we can do an AddMethod on this NewRecord, // and extend it to our liking this.SetProperty ("isChained", true); } } });
The following code is an example usage of the NotifyStateChanged notification:
this.AttachNotificationHandler(consts.get("SWE_PROP_BC_NOTI_STATE_CHANGED"), function (propSet){ var type = propSet.GetProperty("type"); var value = propSet.GetProperty("value"); // This is just an example. Switch-case is preferred if multiple types need to // have custom logic if (type === "cr" || type === "CurRowNum"){ // Current Row has changed at the server. if (value === this.Get("MyPreviouslyStoredActiveRow")){ // Or not! What's going on. Something wrong with my logic? } } if (type === "nr" || type === "NumRows"){ if (parseInt(value) > 1000){ // Woah, this user seems to be going through a lot of records! // Shouldn't she be using the query function? this.SetProperty ("AlertUser", true); } } ... ... });