Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Web API - Create new post entity

Posted on by Microsoft Employee

Hello,

I want to create a new post entity using the Web API. I tried sending a POST http request to /api/data/v.8.2/posts with the body

POST /api/data/v8.2/posts
{
  "text":"sometext",
}

however I receive an error message saying "An unexpected error occurred." I believe this error occurred because I did not bind my post entity to an incident. I tried different http requests:

POST /api/data/v8.2/posts
{
  "text":"sometext",
  "postregardingid": "/postregardings(someguid)"
}

POST /api/data/v8.2/posts
{
  "text":"sometext",
  "postregardingid": {
        "postregardingid": "someguid",
        "regardingobjectid_incident@odata.bind": "/incidents(someguid)"
  }
}

but each one gave me an error. Is there a working example of how to create a post entity using a POST http request?

Thanks


*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Web API - Create new post entity

    Were you able to figure this out?

  • Verified answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: Web API - Create new post entity

    Hello,

    Looks like it well-know issue. Check following thread - community.dynamics.com/.../206303

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans