AX – D365FO – Avoids deleting a record if it has records related to other tables (with table Relations functionality)

If you want to avoid deleting record on a table that has child record related to other table just follow this instructions.

You must create a relation between Table “Al0VendorActivity” and “Al0VendorSearcCriteria”. We want to avoid delete record from “Al0VendorActivity” if at least one record exists in the table “Al0VendorSearcCriteria”.

Create a relation between the two tables

Set “On Delete” property to “Restricted” and “Related table” property to “Al0VendorSearchCriteria”

Set join links between the 2 tables

If you try to delete a record from Al0VendorActivity this error occurs, because it has at least one relation with Al0VendorSearchCrieria

Similarly if you try to delete a record from Al0VendorSearchCriteria this error appears

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s