Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to associate multiple records on a grid.

(0) ShareShare
ReportReport
Posted on by 815

Hi,

We have created custom entity as "Sys info" and linked to accounts entity.  On the account entity, created a grid to Sysinfo entity. We tried to associate sysinfo record to multiple accounts but getting error as "the records is already associated with another record".

We want to link 1 single sys info record with multiple account ? how to do this ?

*This post is locked for comments

  • Syed_Faisal Profile Picture
    Syed_Faisal 815 on at
    RE: How to associate multiple records on a grid.

    To test created new custom entity and tried still getting same issue. Not sure this issue is with Relationship.

  • Suggested answer
    Clem Profile Picture
    Clem 2,541 on at
    RE: How to associate multiple records on a grid.

    This error pops up if one record already associated so it seems that the same records are already associated with the parent record, first check existing childs of parent record.

    as said earlier, is there a hierarchical relationship between accounts or sys info and if so, check the child records to make sure the link is not already existing.

  • Syed_Faisal Profile Picture
    Syed_Faisal 815 on at
    RE: How to associate multiple records on a grid.

    I just deactivated all the WF and tried. Still same error is coming.

  • Clem Profile Picture
    Clem 2,541 on at
    RE: How to associate multiple records on a grid.

    can you try deactivating that workflow and try to create associate the sys info with account  like you tried when getting the error ?

  • Syed_Faisal Profile Picture
    Syed_Faisal 815 on at
    RE: How to associate multiple records on a grid.

    I just created N:N relationship

    Yes workflow is running from Sysinfo, and it s linked to case.

    WF process is --> From Sysinfo field sync to case field

  • Clem Profile Picture
    Clem 2,541 on at
    RE: How to associate multiple records on a grid.

    The error says : "This record cannot be added because it already has a parent record."

    Is there a relationship between account and account or sys info to sys info ?

    Or a plugin/workflow running when one of the entity is updated and perform an update on the current record ?

  • Syed_Faisal Profile Picture
    Syed_Faisal 815 on at
    RE: How to associate multiple records on a grid.

    Hi,

    associate.png

    associate.png

    Error log :

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: This record cannot be added because it already has a parent record.Detail:
    <OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
    <ActivityId>da925d72-52e8-42e1-a94a-95ae16f63473</ActivityId>
    <ErrorCode>-2147187592</ErrorCode>
    <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
    <Message>This record cannot be added because it already has a parent record.</Message>
    <Timestamp>2018-09-05T11:40:04.3474062Z</Timestamp>
    <ExceptionRetriable>false</ExceptionRetriable>
    <ExceptionSource i:nil="true" />
    <InnerFault i:nil="true" />
    <OriginalException i:nil="true" />
    <TraceText i:nil="true" />
    </OrganizationServiceFault>

  • Clem Profile Picture
    Clem 2,541 on at
    RE: How to associate multiple records on a grid.

    Looks like a bug ...

    Can you post a picture regarding the relationship configuration and the complete stack of the error ?

  • Syed_Faisal Profile Picture
    Syed_Faisal 815 on at
    RE: How to associate multiple records on a grid.

    Hi

    i have created N:N relationship and it appears on the both entity but still unable to associate record. throwing error it already has associated.

  • Suggested answer
    Clem Profile Picture
    Clem 2,541 on at
    RE: How to associate multiple records on a grid.

    Hi,

    You need to create a 1:N relationship between the Sys Info 1 -- N Account.

    This will give you a lookup to the Sys info entity in the Account form and a subgrid with all accounts linked to that sys info on the Sys info for.

    If an account must be able to have multiple sys info as well, then you will have to go for a N:N relationship.

    Clément

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans