Question

Custom notification - add "Action"

Hello,

I working on a notification like in the academy article below.

https://academy.bpmonline.com/documents/technic-sdk/7-12/how-create-cus…

The notification show up, but there isn't a way to cancel each item individually. For Invoices, an "Actions" option shows up which a user can use to Cancel the notification item. How can the "Actions" functionality be implemented?

Thank you

Like 0

Like

1 comments

Dear Allen,

Please, find in the configuration a "ReminderNotificationsSchema" schema. You will see that there are two schemas: base schema in NUI package and another one in the Invoice package. So explore that schema in the Invoice package to find out, how "Actions" custom functionality is done. You will find the following code in diff block, that implements functionality for invoices you have mentioned:

{
                    "operation": "insert",
                    "name": "ActionsButtonPostpone",
                    "parentName": "NotificationInvoiceItemContainer",
                    "propertyName": "items",
                    "values": {
                        "itemType": Terrasoft.ViewItemType.BUTTON,
                        "classes": {
                            "wrapperClass": ["notificationActionButtonWrap-class"]
                        },
                        "markerValue": "RemindingActionsMenu",
                        "style": Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
                        "menu": {
                            "items": [{
                                "caption": {"bindTo": "Resources.Strings.PostponeMenuItemCaption"},
                                "markerValue": {"bindTo": "Resources.Strings.PostponeMenuItemCaption"},
                                "menu": {
                                    "items": {"bindTo": "getNotificationActionButtonMenuItems"},
                                    "tag": "postpone"
                                }
                            }, {
                                "caption": {"bindTo": "Resources.Strings.CancelMenuItemCaption"},
                                "markerValue": {"bindTo": "Resources.Strings.CancelMenuItemCaption"},
                                "click": {"bindTo": "cancel"}
                            }]
                        },
                        "visible": {"bindTo": "getInvoiceStatusIsNotFinal"}
                    }
                }

Show all comments