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 CRM (Archived)

Works locally, but not on test environment

(0) ShareShare
ReportReport
Posted on by

I have a plugin created that gets invoked when an entity is being created:

Event pipeline: PostOperation

Exec mode: Async

And basically the create plugin does some things and serializes the entity and sends this over the wire to another endpoint service via POST using the WebClient.

This works great locally but in the test environment, nothing happens. I don't even see the POST happening (as I have logs on this other endpoint). The other endpoint simply adds the entity into the database and returns back an ID to which then the plugin takes and adds it to a custom field in this entity and updates it using the org service.

What is the best way to see why this is not working in test?

if I use something like postman to post the entity to the endpoint, it works successfully and I get back a response and the log written with data, just not sure why Dynamics CRM 365 is not being able to do the POST?

The kicker is that when I profile the plugin, it will not let me debug fully because it uses the WebClient to do the POST and the plugin registration tool crashes...

P.S: I also have an update webhook that does a call to an endpoint but even that does not appear to get invoked by CRM! But when I change the endpoint urls to point to my local, all is fine.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    P.S: I also have an update webhook that does a call to an endpoint but even that does not appear to get invoked by CRM! But when I change the endpoint urls to point to my local, all is fine.

  • Verified answer
    Community Member Profile Picture
    on at

    Please ignore - looks like I finally had coffee and seems that the test server is internal only! Therefore, Dynamics CRM 365 is unable to access it! Working with our IT to expose the endpoint publically.

  • Suggested answer
    Saddamk206 Profile Picture
    777 on at

    Did you put tracing log in plugin? please check the plugin trace log.

    Might be you are using async method , So your plugin registration tool is crashing.

    Also if you are using newton json to serialize or deserialize, then it also not work fine sometimes.

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi,

    When you write any plugin make sure you always implement try catch block inside plugin.Write some line of trace text inside try catch block to get the error.

    Please follow below article-

    www.powerobjects.com/.../debugging-your-plug-ins-with-the-plug-in-trace-log

  • Community Member Profile Picture
    on at

    no errors - try catch all implemented but as stated, this is an issue where the server I am deploying to is internal access only.

    Furthermore it is known that doing any form of web call in a plugin and debugging will cause the pluginregistration tool to crash.

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans