Difference between revisions of "Required fields validation on Inline Detail Form"

From Agility
Jump to: navigation, search
(Created page with "Category:FAQ ==Problem Description== Mandatory fields are not validated on inline forms which are not visible. For example on First Task tab on WO details. Decision if par...")
 
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:FAQ]]
 
[[Category:FAQ]]
==Problem Description==
+
===Problem Description===
Mandatory fields are not validated on inline forms which are not visible. For example on First Task tab on WO details.
+
Mandatory fields are not validated on inline forms which are not visible. For example fields on First Task tab on WO details are not validated when other than First Task tab is active. This behaviour is related to '''Mandatory''' switch on form design and '''Is Required Expression'''. Validation embeded in code is validated always regardless of visibility on form.
Decision if particular element is required or not is evaluated in code. In same code responsible for rendering form. Inline Detail form is rendered only when it is visible. In current rendering mechanism it is very difficult to safety separate code responsible for validation fields. Enabling rendering hidden inline forms (always regardless of visibility) can affect performance.
+
 
 +
===Workaround===
 +
Possible workaround (without code change) is to use generic validation (defined in business rules).
 +
 
 +
'''Example'''
 +
 
 +
Fields ItemID & Quantity are mandatory in planned materials (Work Order ->  First Task -> Planned Materials).
 +
 
 +
[[File:Validation_on_inline_details.png|1200px]]
 +
 
 +
 
 +
Business rules validation of Quantity definition (System Configuration->System Data->Business Rules->DataBO.ProcessMngt.JobBO->Validation Rules)
 +
 
 +
[[File:BusinessRulesJobValidation.png]]
 +
 
 +
'''Warning'''
 +
 
 +
When validation is moved into business rules then such validation is checked in each part of the system which is using same business object and action. It means that business rules validation is not related with particular form only. Above behaviour is wanted in many cases but sometimes it is required that validation is related to particular form only. To enable validation in certain forms only please setup customized formparameter (on desired forms) and extend validation rule with previously defined formparameter. Above action will ensure that validation will be enabled only in context of desired forms.

Latest revision as of 14:32, 20 December 2016

Problem Description

Mandatory fields are not validated on inline forms which are not visible. For example fields on First Task tab on WO details are not validated when other than First Task tab is active. This behaviour is related to Mandatory switch on form design and Is Required Expression. Validation embeded in code is validated always regardless of visibility on form.

Workaround

Possible workaround (without code change) is to use generic validation (defined in business rules).

Example

Fields ItemID & Quantity are mandatory in planned materials (Work Order -> First Task -> Planned Materials).

Validation on inline details.png


Business rules validation of Quantity definition (System Configuration->System Data->Business Rules->DataBO.ProcessMngt.JobBO->Validation Rules)

BusinessRulesJobValidation.png

Warning

When validation is moved into business rules then such validation is checked in each part of the system which is using same business object and action. It means that business rules validation is not related with particular form only. Above behaviour is wanted in many cases but sometimes it is required that validation is related to particular form only. To enable validation in certain forms only please setup customized formparameter (on desired forms) and extend validation rule with previously defined formparameter. Above action will ensure that validation will be enabled only in context of desired forms.