web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Linking of entities and displaying records on form

(0) ShareShare
ReportReport
Posted on by 587

Hi,

I have two tables Contact and contact log and have contact id in both the table. Currently there is no relationship between the tables. So my requirement to show contact log records on contact form for that contact.

I know that i can do subgrid on form but it is showing all records instead of only related records.  please help.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    RaviKashyap Profile Picture
    55,410 Moderator on at
    RE: Linking of entities and displaying records on form

    Hi,

    In order to show the related record in subgrid, you need to have a relationship between the entities. Create a lookup field (Contact) on your Contact Log entity. Once you are done with this, you will get the option for Only Related record on the subgrid on your contact entity.

    This will work fine for new records but for old records, you need to update the newly added field with the correct contact value. For this, you could use any of the above suggested options.

    Hope this helps.

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    33,626 on at
    RE: Linking of entities and displaying records on form

    Hi,

    you can create a console application,

    First

    - retrieve all contact log record with contact id but contact lookup is null.

    Second

    - do a loop and update the record

    Sample references

    1. How to create console

    - https://arunpotti.wordpress.com/2018/02/03/step-by-step-to-connect-dynamics-365-crm-online-v9-x-using-c-console-application/

    2. How to query data from CRM

    - https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/org-service/use-fetchxml-construct-query

    3. How to update record

    https://docs.microsoft.com/en-us/previous-versions/dynamicscrm-2016/developers-guide/gg328416(v=crm.8)

     

  • SamiraM Profile Picture
    587 on at
    RE: Linking of entities and displaying records on form

    how to patch the contact lookup field

  • SamiraM Profile Picture
    587 on at
    RE: Linking of entities and displaying records on form

    Related record option is not coming. Only Show all record is coming

  • SamiraM Profile Picture
    587 on at
    RE: Linking of entities and displaying records on form

    how to patch the contact look fields?

  • Suggested answer
    Shahis Profile Picture
    170 on at
    RE: Linking of entities and displaying records on form

    Have you configured your subgrid properties to display only related records? The other option is to create a new view that suits your requirement and select that view as the default view for the subgrid.

    Thanks,

    Shahid

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,626 on at
    RE: Linking of entities and displaying records on form

    Hi,

    What you can do.

    1. Create contact lookup in contact log, and patch the contact lookup field.

    - you will see the contact log under related entity of contact.

    2. Create a report and show in on form.

    -  alexmscrm.blogspot.com/.../how-to-show-report-in-entity-form-and.html

    I will recommend you go for first one.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans