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)

What Plugin Message will trigger while attaching an activity to an entity

(0) ShareShare
ReportReport
Posted on by 539

Hello CRMers,

Morning.

My environment is Dynamics CRM 2013 on-premise.

I have a scenario, where I want to track an activity when attached to an entity.

I wonder what plugin message will trigger while attaching an activity to an entity.

One option I think is to use create on each activity, but how to know to for which entity this activity attaching?

Please advise me. 

Advance thanks!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    ashlega Profile Picture
    34,477 on at

    Hi,

     you should be able to do it with "Update" and "Create".

     There is regardingobjectid attribute in the Activity entity - you'll need to look at that one.

  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Suresh,

    As told by Alex, there is a lookup field with logical name regardingobjectid which stores the value of the record to which the activity is attached. When the activity is created, at that time the regarding field will not be updated. It will be null. So we don't get that attribute in target entity. So you should register the plugin on the update of each activity and set the regardingobjectid field as filtering attributes so that plugin executes only when regardingobjectid field is updated.

    See: https://social.microsoft.com/Forums/en-US/d14fbcd0-beec-4287-b12c-f5f21c6614e4/task-and-phone-activity-created-through-the-social-pane-crm-2013?forum=crmdevelopment

    I suggest you register the plugin as follows.

    Message: Update

    Entity: Give each activity entity differently (like email, phonecall and so on)

    Filtering Attributes: regardingobjectid 

    23846.1.PNG

    Hope this helps.

  • hellosuresh Profile Picture
    539 on at

    Thanks Alex and Nithya.

    Instead of update, we can use Create message, because regarding field is mandatory on activities.

  • Suggested answer
    ashlega Profile Picture
    34,477 on at

    Kind of.. but don't confuse form-level mandatory(that's what it is in Dynamics) with server-side mandatory(there is no such thing in Dynamics other than if you have that validation in the plugin/workflow/entity business rule).

    There is at least one scenario where regarding does not seem to be set during "Create" for emails (that's what I ran into a few weeks ago on 2015) - it's when you are using "send direct email" option. There is an update that follows right away, and regarding is set in that update

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