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 1

Like

1 comments

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.

Show all comments

Hi!
Is it possible to show all emply madatory fields in one message? 

Like 0

Like

3 comments

Hello,

Usually, the Mandatory Error message will show all the Mandatory fields that are not filled

Not in Classic UI as i understand

Hello,

Unfortunately, currently, it is not possible to display the names of all required fields that are not filled in. We've registered it in our R&D team backlog for consideration and implementation in future application releases. 

Thank you for helping us to improve our product.

Show all comments