Hi community!
We have created replacing schema - VisaNotificationsSchema. In VisaNotificationsSchema we added code to hide "Reject" and "Change approver" buttons. We want to apply it for specified objects . To do it we need to retrieve object Id from Approval. Any suggestions how can we do it?
Best regards,
Jana
Like
1 comments
12:06 Mar 08, 2022
Hi Yana,
I just prepared working example so You can adopt it to Your case
define("VisaNotificationsSchema", function() {
return {
methods: {
getVisaActionButtonMenu: function() {
var menu = this.get("VisaActionButtonMenu");
if (!Ext.isEmpty(this.values) ? this.values.SchemaName=='Opportunity' : false) {
menu.removeByIndex(1);
menu.removeByIndex(1);
menu.removeByIndex(1);
}
return menu;
}
},
diff: [
{
"operation": "merge",
"name": "VisaActionButton",
"parentName": "NotificationItemTopContainer",
"propertyName": "items",
"values": {
"itemType": Terrasoft.ViewItemType.BUTTON,
"style": Terrasoft.controls.ButtonEnums.style.TRANSPARENT,
"classes": {"wrapperClass": ["visaActionButtonWrap-class"]},
"caption": {"bindTo": "Resources.Strings.VisaActionButton"},
"prepareMenu": {"bindTo": "selectNotificationItemOnActionButtonClick"},
"menu": {
"items": {"bindTo": "getVisaActionButtonMenu"}
}
}
}
]
};
});Best regards,
Marcin
Show all comments