On the Order form in the Order entity, the Customer ID lookup field had to be used. D365 won't allow you to remove it as it's locked to the form by the system or make it 'Optional' in the Field Requirement section (default is Business Required) as it has to contain a Contact or Account so I can't hide it.
I am trying to link new contacts made through the Customer ID field to the Order form and display them in a subgrid. Other lookup fields allow you to edit the 'Related Records Filtering' section (see below) but the Customer ID field doesn't have that option.
Can anyone advise how I would add multiple contacts to the order form in a subgrid please or if I should do it another way?
Hi Leo,
Thank you for your response.
Is there a way to add contacts through the Customer ID field so that they automatically appear in the subgrid as opposed to having to scroll through the contact list in the subgrid or search for the new contact and add manually?
Hi partner,
1. "Customer" is a field type instead of en entity. "Customer id" is not a standard lookup field. It can be either Account entity or Contact entity.
Moreover, the relationship between (Account or Contact) and Order is 1:N.
2. Only entity can be selected in the subgrid, and the relationship between this entity and the Order must be N:1.
To meet your requirement, you should create a new 1:N relationship between order and contact which allows people show subgrid of contacts in order form.
About how to create 1:n realtionship, please refer to this DOC.https://docs.microsoft.com/en-us/dynamics365/customer-engagement/customize/create-and-edit-1n-relationships
For example, we created a new 1:N realtionship between order and contact like the picture shows bellow, then a new lookup field will be added into contact form.
Then we go to the order form editor and insert a new subgrid.
When we choose the entity, we need to find the correct entity based on the fields in parentheses, the fields in parentheses is was the one that be created by the new relationship as I did in the previous step.
Now we could link contacts to order.
BTW, if you want to hide the OOB customer id field, you could use js code to do this.
https://carldesouza.com/hiding-and-showing-a-field-in-dynamics-365-using-javascript/
Hope it helps.
Best Regards,
Leo
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,900 Super User 2024 Season 2
Martin Dráb 229,297 Most Valuable Professional
nmaenpaa 101,156