Dear community,
We have set an approval for our invoices. Our users get a notification to approve or reject an invoice. While using the notification center we noticed that the notifications are quite limited in information.
Question: How do we show more info in the notifications like contact name or invoice amount?
Idea: https://prnt.sc/10jjga5
Kind regards,
Yosef
Like
Hello Yosef,
First of all you will need to create a custom container that could contain all the needed information (this should be added to the replaced VisaNotificationsSchema view model and the example below is for cases):
[ { "operation": "insert", "name": "NotificationItemCustomContainer", "parentName": "NotificationItemTopContainer", "propertyName": "items", "values": { "itemType": Terrasoft.ViewItemType.CONTAINER, "items": [] } }, { "operation": "insert", "name": "NotificationContactAdditionalInfo", "parentName": "NotificationItemCustomContainer", "propertyName": "items", "values": { "itemType": Terrasoft.ViewItemType.LABEL, "caption": {"bindTo": "getCustomContainerContent"}, "visible": {bindTo: "getContentSchema"} } }, ]
Then you will need to control the visibility of this container based on which schema does the visa notification represent:
getContentSchema: function(){ var entityName = this.get("SchemaName"); if (entityName=="Case"){ return true; } else { return false; } },
And finally the most difficult task is to populate needed fields with proper values. The problem here is that the table that is called upon displaying visa notifications is "UsrCaseVisa" and it doesn't contain information on case contact or account and so on so you will need to create some additional logic that will also get data from the case that is related to the visa.
Best regards,
Oscar