Hello
I'm trying to make the approval comment field mandatory for a DCM. The idea is that the approval cannot be approved or rejected if a comment hasn't been added to the section. That is, all approvals need to have a comment added to them.
I try to marked the comment as obligatory in the object "Basevisa" but it didnt work.
Any idea how can I make the comment mandatory.
Thank you
Like
Hello Laura,
In classic UI there are two approaches: either one provided here (but don't forget to disable the AcceptApprovalWithoutComment system setting) or creating a replacing view module for the PreconfiguredApprovalPage and add this code:
define("PreconfiguredApprovalPage", [], function() { return { attributes: {}, methods: { save: function() { const approvalComment = this.get("Comment"); if (approvalComment.length > 0) { this.callParent(arguments); } else { Terrasoft.showErrorMessage("Comment is mandatory"); } } }, diff: /**SCHEMA_DIFF*/ [] /**SCHEMA_DIFF*/ }; });
As for the Freedom UI - as was mentioned here and here - this is not avialable in Freedom UI as for now. I will notify our R&D team about your question to prioritize the task to develop the logic for them.