Preventing Duplicates
Learn how to prevent duplicate requests.
If a request is handled several times, duplicates might occur. You can prevent duplicates as follows:
-
RequestControl
: Requests sent by CRM.pad are (automatically) sequentially numbered. If e.g. the network connection is interrupted and the information about a successfully processed request could not be sent to the client anymore, the server recognizes (based on the numbering) that this request was already processed. - Key fields: If key fields are applied, the existence of these fields can be checked. If
a record with the same key field values and the same link records already exists, the
existing record is used.
If you use key fields, you must define Template filters that apply the key property. You can assign these Template filters in the following input arguments of the
SerialEntry
action call. For further details, see SerialEntry.-
DestinationTemplateFilter
-
DestinationChildTemplateFilter
-
DestinationParentTemplateFilter
-
Example: Duplicate Prevention
The following example shows how Template filters prevents duplicates in the order entry quick add.
Define the following configuration units:
-
UP
.NoDouble
filter: Defines that for each order and article only one record can exist.Note: This example definition does not apply in every implementation, therefore, you might have to adapt it.
You must define at least one value to be able to save the filter. "
*
" indicates that no pre-defined value is available (because if you define a value, e.g. "123
", this value is written to every record). -
LP.NoDouble
filter: This filter is applied to Delivery Items (LP) defining that for each Delivery Date (LD) and Order Item (UP) only one records is created.
The match-up is carried out using both links in the LP record, but to apply the key field logic at least one key field must defined.
You can use the delivery date from the LP record, but in this case you need to define that it is entered by the quick add functions. In this example, the Quantity field is checked as in case that a duplicate occurs this field contains the same value as the original value.
Set the following
SerialEntry
input arguments in the action call as follows:-
DestinationTemplateFilter = UP.NoDouble
-
DestinationChildTemplateFilter = LP.NoDouble
-