Go to primary content
Siebel CRM Configuring Siebel Open UI
Siebel Innovation Pack 2016, Rev. A
E52417-01
  Go to Documentation Home
Home
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
    View PDF

Notifications That Siebel Open UI Supports

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".

Summary of Notifications That Siebel Open UI Supports

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:

  • state

  • value

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:

  • One time a value of false for the last row selected

  • One time with a value of true for the new row that Siebel Open UI is selecting

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:

  • index identifies the index of the row that Siebel Open UI is activating or deactivating.

  • Boolean is true or false.

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:

  • row identifies the row that Siebel Open UI is activating or deactivating.

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:

  • index identifies the index of a record that resides in the current set of records that Siebel Open UI is deleting.

  • Boolean is one of the following values:

    true. Shift records up after the delete.

    false. Shift records down after the delete.

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:

  • index identifies the start index of the record that Siebel Open UI is deleting.

  • number identifies the number of rows that Siebel Open UI must delete.

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:

  • index identifies the index of the record that Siebel Open UI is inserting.

  • child identifies the child property set that contains the record data.

  • array is an array that contains the field values of the record that Siebel Open UI is inserting. This array must use the same sequence that the business component uses when it lists these field values.

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:

  • row identifies the index of the record that Siebel Open UI is creating.

  • Boolean is one of the following values:

    true. Place the new record before the previous active row.

    false. Place the new record after the previous active row.

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:

  • field identifies the name of the field that Siebel Open UI is modifying.

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:

  • field identifies the name of the field that Siebel Open UI is modifying.

  • child identifies the name of the child property set that contains the modification details.

You can use the following syntax in the child property set:

SWE_PROP_FIELD_ARRAY:string1
SWE_PROP_VALUE_ARRAY:string2

where:

  • string1 is an encoded string that identifies the field index.

  • string2 is an encoded string that identifies the field value.

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:

  • Using a default query specification

  • Starting or running a query

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:

  • field identifies the name of the field that Siebel Open UI is querying.

  • search specification identifies a query specification that is defined on this field.

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:

  • sort specification identifies the sort specification that Siebel Open UI runs. This sort specification resides on the business component in the SRF.

  • search specification identifies the search specification that Siebel Open UI runs. This search specification resides on the business component in the SRF.

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.


Using Notifications with Operations That Call Methods

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.

NotifyGeneric Notification Type

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:

  • applet name identifies the name of the applet where Siebel Open UI sends the notification.

  • value is one of the following:

    1. Indicates selected.

    0. Indicates not selected.

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:

  • applet identifies the name of the applet that Siebel Open UI calls during the first operation.

  • method identifies the name of the subsequent method that Siebel Open UI calls.

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:

  • placeholder is a placeholder array that you can you use.

  • view identifies the name of the view where Siebel Open UI displays the picklist.

  • applet identifies the name of the applet where Siebel Open UI displays the picklist.

  • identifier identifies the HTML identifier of the control that requested the picklist values.

  • control contains one of the following values:

    true. Picklist is associated with the control.

    false. Picklist is not associated with the control.

  • string contains the values of the picklist.

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:

  • applet name identifies the name of the applet where Siebel Open UI sends the notification.

  • value contains the value of the beginning row.

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:

  • applet identifies the name of the applet.


NotifyStateChanged Notification Type

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:

  • 0. The business component can delete a field.

  • 1. The business component cannot delete a field.

You can use cd (can delete) as an abbreviation for bCanDelete.

bCanInsert

Returns a Boolean value that includes one of the following values:

  • 0. The business component can insert a field.

  • 1. The business component cannot insert a field.

You can use ci (can insert) as an abbreviation for bCanInsert.

bCanInsertDynamic

Returns a Boolean value that includes one of the following values:

  • 0. The business component can insert a dynamic field.

  • 1. The business component cannot insert a dynamic field.

You can use cud (can insert dynamic) as an abbreviation for bCanInsertDynamic.

bCanMergeRecords

Returns a Boolean value that includes one of the following values:

  • 0. Merge is available in multi select mode.

  • 1. Merge is not available in multi select mode.

You can use cm (can merge) as an abbreviation for bCanMergeRecords.

bCanQuery

Returns a Boolean value that includes one of the following values:

  • 0. The business component can query a field.

  • 1. The business component cannot query a field.

You can use cq (can query) as an abbreviation for bCanQuery.

bCanUpdate

Returns a Boolean value that includes one of the following values:

  • 0. The business component can update a field.

  • 1. The business component cannot update a field.

You can use cu (can update) as an abbreviation for bCanUpdate.

bCanUpdateDynamic

Returns a Boolean value that includes one of the following values:

  • 0. The business component can update a dynamic field.

  • 1. The business component cannot update a dynamic field.

You can use cud (can update dynamic) as an abbreviation for bCanUpdateDynamic.

bCommitPending

Returns a Boolean value that includes one of the following values:

  • 0. A commit is pending on the business component.

  • 1. A commit is not pending on the business component.

You can use cp (commit pending) as an abbreviation for bCommitPending.

bDelRecPending

Returns a Boolean value that includes one of the following values:

  • 0. A delete is pending on the business component.

  • 1. A delete is not pending on the business component.

You can use dp (delete pending) as an abbreviation for bDelRecPending.

bExecuted

Returns a Boolean value that includes one of the following values:

  • 0. Siebel Open UI finished processing the business component records.

  • 1. Siebel Open UI did not finish processing the business component records.

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:

  • 0. The business component is in multiselect mode.

  • 1. The business component is not in multiselect mode.

You can use ms (multiselect) as an abbreviation for bInMultiSelMode.

bInQueryState

Returns a Boolean value that includes one of the following values:

  • 0. The business component is in a query state.

  • 1. The business component is not in a query state.

You can use qs (query state) as an abbreviation for bInQueryState.

bInverseSelection

Returns a Boolean value that includes one of the following values:

  • 0. An inverse of selection is occurring on the business component.

  • 1. An inverse of selection is not occurring on the business component.

You can use is (inverse selection) as an abbreviation for bInverseSelection.

bNewRecPending

Returns a Boolean value that includes one of the following values:

  • 0. A new record is pending on the business component.

  • 1. A new record is not pending on the business component.

You can use np (new record pending) as an abbreviation for bNewRecPending.

bNotifyEnabled

Returns a Boolean value that includes one of the following values:

  • 0. The business component is not enabled for notifications.

  • 1. The business component is enabled for notifications.

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.


Example Usages of Notifications

This topic describes example usages of notifications.

Example of the NotifyBeginNotifys Notification

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);
});

Example of the NotifyNewSelection Notification

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"));
}
});

Example of the NotifyNewFieldData Notification

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);
}
}

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);
}
}
});

Example of the NotifyNewData, NotifyInsertWorkSet, and NotifyDeleteRecordSet Notifications

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);
}
});

Example of the NotifyBeginQuery, NotifyNewFieldQuerySpec, and NotifyEndQuery Notification

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);
});

Example of the NotifyEndNotifys Notification

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);
});

Example of the SWEIRowSelection Notification

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);
}
}
});

Example of the BegRow Notification

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]));
}
});

Example of the GetQuickPickInfo Notification

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);
}
}
});

Example of the ClosePopup Notification

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!");
}
});

Example of the SWEAInvokeMethod Notification

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);
}
}
});

Example of the NotifyStateChanged Notification

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);
}
}
...
...
});