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 create a Post entity and associate it with a Lead via the Web API

(0) ShareShare
ReportReport
Posted on by

Hello.  Using the Dynamics Web API, I'd like to create a Post entity associated with a Lead.  The part I'm struggling with is how to associate it with the Lead.  I have the Lead GUID.  I've tried specifying the Lead ID using various combinations such as "postregardingid", "regardingobjectid_lead@odata.bind", "regardingobjectid_lead", "_regardingobjectid_value" and several others.  I just get various errors usually about it being an undeclared property.  The SDK (which I'm not using) appears to link Posts to objects via the property "RegardingObjectId" (see here).  I'm not sure what the equivalent is when using the Web API.  Any suggestions or examples of working code would be very appreciated.

Thank you,

Ben

*This post is locked for comments

  • RE: How to create a Post entity and associate it with a Lead via the Web API

    Hi Andrew,

    Thanks for the bad news :)  I appreciate the suggestion on Actions ... I might look into them if it turns out not to be possible to create a Post directly via the Web API.

    My only concern with that is my code will be sending leads and posts to various MS Dynamics accounts that I don't own and I'm not sure how easy or feasible it'll be to create Actions in different accounts.  According to this, it looks like actions can be created via code which is good news although the code they show is using the SDK which I've not had to use it (it would be nice to avoid the dependency).  Then again, the SDK code sample here has an example of adding a Post and relating it to an object, so it might be worth me using the SDK.  Will do some additional research.  Thanks again for the advice.

    Regards,

    Ben 

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,325 Most Valuable Professional on at
    RE: How to create a Post entity and associate it with a Lead via the Web API

    Hello Ben,

    I remember I was playing around it trying to make it work but it seems it's not possible in direct way so I would recommend to create an Action that will does it and call the action to create a post.

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

Announcing Our 2025 Season 1 Super Users!

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

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

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,401 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans