Skip to main content

Notifications

Customer Service forum

Link multiple Contacts to Order form

Posted on by 55

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.

pastedimage1565879241929v1.png

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?

  • JustLearning Profile Picture
    JustLearning 55 on at
    RE: Link multiple Contacts to Order form

    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?

  • Suggested answer
    LeoAlt Profile Picture
    LeoAlt 16,329 on at
    RE: Link multiple Contacts to Order form

    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.

    5342.PNG
     

    2. Only entity can be selected in the subgrid, and the relationship between this entity and the Order must be N:1.

    1-_2800_1_2900_.PNG

    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.

    pastedimage1565945492374v1.png

    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.

    pastedimage1565945910006v2.png

    Now we could link contacts to order.

    pastedimage1565946577141v3.png

    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

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,900 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,297 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans