I have a custom form called gate pass
with two data sources The first data source is called gate pass table
and the other one is called driver table
.
gate pass table
has a foreign key relation with driver table
on field national ID
. That means national Id
is a field in both tables.
In the form, three fields are shown:
- driver national ID
- driver name
- driver contact number
I want to enable the user to select national ID
using a lookup and also be able to add a new national ID
by entering it in the driver national ID field. If the national Id
exists in the driver table
the related name and contact should load. Otherwise the user should enter those as well and a new record should be added to the driver table
.
However I want to meet this requirement by using Dynamic 365 features. I wonder whether I can use join data source property or not?
I have set the join source property of the driver table
data source to gate pass
data source with Active link type. There are two problems:
When I select
national Id
in the main form the name field and contact field are loaded automatically but I should refresh data source to see the update.If the user enters a new
national Id
, the following error is shown:
"The value 'xxxxx' in field 'Driver nationalId' is not found in the related table 'DriverDetails'."
PS: In the gate pass
form, the data source of the national Id
field is gatepass
and the data source of fields driver name and contact is driver table
.