Select-Function

Learn about Select-Function attribute.

The following functions are available:

  • selectRecord: To link a record to the current record, users click on the record selector icon beside the link field and search for records according to the settings you specified in the Select-Function. For further details, see Defining selectRecord Functions.
  • findAsYouType: To link a record to the current record, users type a search string into the link field and get all matches in a drop-down list according to the settings you specified in the Select-Function. For further details, see Defining findAsYouType Functions.
    Note: selectRecord and findAsYouType functions are supported for Details and List controls.
  • selectFormat: Users can select a format. For further details, see Defining selectFormat Functions.
  • selectInfoAreaId/selectFieldId: Users can pick an info area and field. For further details, see Defining selectInfoAreaId and selectFieldId Functions.
  • In addition, you can call any custom JavaScript select/deselect function via the Select-Function attribute. For more information, see the article “How to create a custom selector” at https://support.aurea.com.

Standard link fields (Z-fields) that are configured into a Details or List control automatically display the record selector icon . This provides users with the possibility to search for and select a record that is then linked to the current record (Example in UPDATE_DEFAULT: the End Customer Company field in the Ticket info area).

The Select-Function attribute extends the behavior and functionality of link fields: It defines which records from which info area can be selected and how the relation is set after a record has been selected. It also allows fields to be filled with values from a linked record. (Examples in UPDATE_DEFAULT: the Postal Code field in the Company info area, the Predecessor field in the Ticket info area etc.)

Example: The Predecessor field in the Ticket info area has the following Select-Function defined (KM Details control):

selectRecord(
{
	from:
	{
		infoAreaId: "KM",
		searchContext:
		{
			items:
			[	
				null,
				"KP",
				"FI"
			]
		}
	},
	target:
	{
		71: 6,
		72: 7,
		addLink: true
	}
})

The selected record is then linked to the current record. The record's reference text is written to the link field. You can define custom reference texts in the Configuration info area (MC) (Data Model category, Reference Text option). For further details, see Configuration Info Area in the CRM.Core Administrator Guide.

When in View mode, clicking on the link opens the default view of the linked record, click and hold opens the QuickView.

If a link is changed (because the user selects a different record), data is reset.

To clear a link field, users need to click the Remove Link button (beside the record selector button). The Remove Link button is displayed if the following conditions are met:

To clear/reset field values when deleting/changing a link, you can define a custom Delete function. For further details, see Delete Link.

Note: Both the record selector and remove link buttons are displayed only when in Edit mode.
Note: By default, reference fields that are marked as read-only (either in the Aurea CRM data model or in CRM.Designer via the Readonly field attribute, see Readonly) never display a record selector button . You can override this behavior by setting the Web Configuration parameter RecordSelector.ShowSelectorIfDefined to true and explicitly specifying a Select-Function for the desired reference fields, see RecordSelector.ShowSelectorIfDefined. The record selector icon is then displayed regardless of the above mentioned read-only settings.
Note: In this case, it is the administrator’s responsibility to ensure that the Select-Function "makes sense" and fills the required (key) fields. This possibility increases Aurea CRM.Web’s flexibility and may e.g. be used to let users reassign parent records if required.
Note: User's access rights settings are only checked for the field where the Select-Function is defined (not for the fields contained in the function).
Note: If a user has no update rights for an info area, no record selectors are displayed.