Difference between revisions of "Required fields validation on Inline Detail Form"
| (11 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[Category:FAQ]] | [[Category:FAQ]] | ||
===Problem Description=== | ===Problem Description=== | ||
| − | Mandatory fields | + | 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=== | ===Workaround=== | ||
Possible workaround (without code change) is to use generic validation (defined in business rules). | 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). | Fields ItemID & Quantity are mandatory in planned materials (Work Order -> First Task -> Planned Materials). | ||
| − | Business rules validation definition (System Configuration -> System Data -> Business Rules->DataBO.ProcessMngt.JobBO-> Validation Rules) | + | |
| + | [[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).
Business rules validation of Quantity definition (System Configuration->System Data->Business Rules->DataBO.ProcessMngt.JobBO->Validation Rules)
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.
