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 update the record in an azure function triggered by a webhook

(0) ShareShare
ReportReport
Posted on by 180

I have an Azure function triggered post creation of a record in Dynamics 365 CE. The azure function and Dynamics 365 CE are integrated by a Webhook registered via the Plugin Registration.

What is the best way to update some data fields inside the record in RemoteExecutionContext .

Do I connect to Dynamics again or I can update as part of the Dynamics pipeline?

*This post is locked for comments

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,052 on at
    RE: How to update the record in an azure function triggered by a webhook

    Hi

    The links I included in my suggestion is to help you connect to CRM to update the record.

    As far as I know, a webhook is based on a publish/subscribe pattern and data only goes one way.  There wont be any active connection open,  to maintain a pipeline open between the webhook sender and receiver.

    And if you keep a sync plugin to wait for a response from a webhook receiver, it will clearly affect the performance and will hold up CRM the UI.  I think its for these reasons, CRM will not process any response when it sends a webhook out. it will just check if the HTTP status was ok or failed. 

    So now to answer your question of "I can update as part of the Dynamics pipeline?" I don't think you can update using the same context as there is no active connection or pipeline exists as I mentioned above.

    That means you do have to connect to CRM again if you want to update record. The RemoteExecutionContext gives you all the details you need and you can use the entity name and record Id or other info to perform the update back to CRM.  And for updating back to CRM, please refer to the links I mentioned in my previous post.

  • BiR Profile Picture
    BiR 180 on at
    RE: How to update the record in an azure function triggered by a webhook

    I have already seen all the above links. Please read my ask first.

    All the options do not perform an update on the Target record, which in case of a Post webhook and a new HttpClient from the azure function (handler) returns a 404.

  • Kokulan Profile Picture
    Kokulan 18,052 on at
  • BiR Profile Picture
    BiR 180 on at
    RE: How to update the record in an azure function triggered by a webhook

    There's also a StackOverflow: stackoverflow.com/.../how-to-update-the-record-in-an-azure-function-triggered-by-a-webhook

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,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,309 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans