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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

How to Add an Existing Record into a Subgrid in Dynamics 365 CRM Using c#

(0) ShareShare
ReportReport
Posted on by 62

Hi All,

How to Add an Existing Record into a Subgrid in Dynamics 365 CRM Using c#.

Let us take a scenario on the Account record where we need to add an existing contact in the Contacts Subgrid.

thanks in advance .

Regards,

Prakash M

I have the same question (0)
  • Suggested answer
    Wahaj Rashid Profile Picture
    11,321 on at

    Hi,

    Thank you for your query.

    You can use Web API to bind the contact with an account.

    Here is the Web API request example:

    PATCH [Organization URI]/api/data/v9.0/contacts(<Contact-Guid>) HTTP/1.1
    Content-Type: application/json
    Accept: application/json
    OData-MaxVersion: 4.0
    OData-Version: 4.0

    {
    "parentcustomerid@odata.bind":"[Organization URI]/api/data/v9.0/accounts(<Account-Guid>)"
    }

    You can use HttpRequest or HTTPClient to post request on Dynamics 365 Web API.

    Here is the official samples using C#. Net:

    Web API CDSWebApiService Basic Operations Sample (C#) (Microsoft Dataverse) - Power Apps | Microsoft Docs

    You can also Postman to test your scenarios:

    Set up a Postman environment (Developer Guide for Dynamics 365 Customer Engagement) | Microsoft Docs

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 49 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 38 Super User 2025 Season 2

#3
#ManoVerse Profile Picture

#ManoVerse 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans