Archive
Posts Tagged ‘Page_Validators’
ADX Portals 7.x – ‘Page_Validators’ is undefined
April 14, 2019
Leave a comment
Other day, while adding a custom validator using JScript on an Entity Form, I was getting ‘Page_Validators’ is undefined error, at below line of code.
// Add the custom validator to Web Page’s validators array
Page_Validators.push(spouseValidator);
Reason:
- The dynamics CRM form, associated to the ADX Entity Form, does’t have any required field, hence ‘Page_Validators’ array is NULL as ADX did’t need to load any validators.
Fix:
- ‘Page_Validators’ is a validator collection and we dont have control over this.
- Below workaround worked for us:
- Make one of the field as ‘Required’ by adding ‘Entity Form Metadata’. ADX instantiates ‘Page_Validators’ array, as there is Required field now.
- You can make the field as Non-required in the JScript.
Note:
- This behavior is fixed in further versions of ADX and Dynamics Portals.
🙂
Categories: ADX, Dynamics Portals
$ undefined, ADX, Page_Validators