RECOMMENDATION: If you are using a version of The Portal Connector higher than 4.0, we strongly recommend utilizing the MVC based widgets and components to create your site. This documentation is for legacy purposes only and will soon be deprecated.
Widget Type:
Form Widgets
TPC Version:
  • 4.0
validatorlogo
The CRM Validator widget allows you to validate the number of records retrieved from a user-defined FetchXML. In the event of a failed validation, the widget will display a user-defined message and prevents the form from being submitted. 

For example: The CRM Validator can be used to prevent duplicate emails from being submitted. To do this you would set a fetch to look for all Account Emails while also adding a filter to the fetch. Then, you would navigate to the Filter tab. In this tab, you may make use of the unique Field Value Type in order to retrieve the correct value from the form to validate it with already existing records.

Configuration

Basic

Drag the CRM Validator from the Portal Connector widget list into the body of your form and click on the edit button to display the properties prompt.

The Basic settings of the widget includes a FetchXML text area for you to define a fetch that the widget will use to determine if a form submission is valid or not, based on the returned number of records.

The Operator dropdown list allows you to select a comparative operator (=, >, <=, etc.) to use against your fetch.

The Aggregate Value numeric textfield allows you to specify a whole, positive number for the widget to compare with its results.

Please note that it is very important to ensure that the fields that you wish to validate have an alias set so that you may compare the field data to any existing records. 


validator-instruction1

Filters

The Filter Tab has a unique type known as the Field Value. You may also click on the Value box to show a drop down list of widgets present on the form. This means that the CRM Validator will filter your records by the value in the specified field during a submission attempt.
validator-instruction-2

Widget Properties

Basic Properties

ValidateonLoad

The ValidateonLoad advanced property will allow the Validator to activate when the form is loading. If the form is in edit mode, this is when all of the values on the form have been populated. If the form is in add mode, you cannot filter by field values.

Description

Add a description to the validator for you convenience.

Fetch XML

The FetchXML text area determines what sort of data a widget will be populated with. 

Clicking the Load Default Fetch option will populate the FetchXML area with a default fetch based on the CRM Entity chosen. By clicking the Build button, we will be sent to another page in order to determine what the widget will look up. For more information on how to use the FetchXML function.

Is Aggregate Fetch

Enable Aggregate Fetch

Aggregate Field Alias

The Aggregate Field Alias text box will fetch an aggregated attribute by its alias in order to validate a form submission.

Operator

The Operator drop down list allows you to choose an operator from which to compare a value with. Applicable options include: Equal to, Less Than, Less Than or Equal To, Greater Than, and Greater Than or Equal to.

Required Records

Select how many records required

Invalid Message

The Invalid message content

EncryptGuids

The EncryptGuids advanced properties determines whether Guids should be encrypted or not. By default this is set to true.

Advanced Properties

Advanced properties provide additional functionality. They can be accessed by clicking on the "Advanced" Button in the bottom right corner of the widget designer.

ValidateonLoad

The ValidateonLoad advanced property will allow the Validator to activate when the form is loading. If the form is in edit mode, this is when all of the values on the form have been populated. If the form is in add mode, you cannot filter by field values.

Description

Add a description to the validator for you convenience.

Fetch XML

The FetchXML text area determines what sort of data a widget will be populated with. 

Clicking the Load Default Fetch option will populate the FetchXML area with a default fetch based on the CRM Entity chosen. By clicking the Build button, we will be sent to another page in order to determine what the widget will look up. For more information on how to use the FetchXML function.

Is Aggregate Fetch

Enable Aggregate Fetch

Aggregate Field Alias

The Aggregate Field Alias text box will fetch an aggregated attribute by its alias in order to validate a form submission.

Operator

The Operator drop down list allows you to choose an operator from which to compare a value with. Applicable options include: Equal to, Less Than, Less Than or Equal To, Greater Than, and Greater Than or Equal to.

Required Records

Select how many records required

Invalid Message

The Invalid message content

EncryptGuids

The EncryptGuids advanced properties determines whether Guids should be encrypted or not. By default this is set to true.