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)

How to register plugins for email entity

(0) ShareShare
ReportReport
Posted on by

While i click the email send i have triggered the plugin with post condition and message as send and setEntity to trigger plugin to update current email sending activity date in the custom field as last activity. While i send normal mail it triggers, if i send with attachment in email this plugin not getting triggered.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    I can confirm that behavior. The potential workaround for that - use SetStateDynamicEntity message in pre-mode to do stuff that you need.

  • Community Member Profile Picture
    on at

    Hi Andrew,

    I have changed SetStateDynamicEntity message in pre-mode still it is not working. Sometimes its start working with POST condition and sometimes suddenly it stop working, is there any other reason for this behavior.

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Can you please provide a screenshot of registration and code that you use?

  • Community Member Profile Picture
    on at

    7558.2.JPG

    7558.2.JPG

    Please find the above screenshots and guide me to resolve this problem. Attached the Steps registered for email and the plugin code.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    I see that you have SetState and Send plugins registered for Post-Operation. Change it to Pre-Operation and test in again.

  • Community Member Profile Picture
    on at

    Thanks!, Yes i followed your steps it helps in non prod its working fine. But in Prod sometime it stopped working. In the plugin code i am getting the ActualEnd date from Email entity and setting it to my custom field in opportunity. I there any other reason that causing this issue.

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Here is what I have and tell if I think the right way - on Send of email you want to get ActualEnd value from email and update some custom field on parent opportunity. What happens at production environment - your plugin not always get triggered/or ActualEnd value is available.

    If what I wrote is your scenario here is what I can recommend - switch your plugin to Async. I'm not 100% sure it'll resolve the issue with triggering but during execution time you will have ActualEnd field populated.

    Good luck.

  • Community Member Profile Picture
    on at

    I am going to try your suggestion by changing it to Post- condition with Async mode. In production while user tried to send mail it always triggering the message step "Send" alone, but the message step SetState and SetStateDynamicEntity not triggered always. may i know the reason for this behavior?

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