Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Can't create correct ActivityPointer class for plagin using Developer Toolkit for Dynamics365

Posted on by 20

Hi.
I'm trying to create a plagin, using Developer Toolkit for Dynamics 365 + Visual Studio 2012.

When i try to "Create Class for Entities", classes for some entities generate correctly (for Emails, PhoneCalls, Appointments and e.t.c.), but when i try to create class for ActivityPointer, it is created with 1 method and nothing more.
No error messages appear, no informational messages appear. Just a trimmed class. What could be the reason?

  • Dmitry A Profile Picture
    Dmitry A 20 on at
    RE: Can't create correct ActivityPointer class for plagin using Developer Toolkit for Dynamics365

    In the previous vers of my project for CRM 2011, I tried to create plugins for certaim types of activities. And for each of them I'm using QueryExpression with Filter by ActivityPointerState.Completed. I received a list of all action records, associated with the entity "regardingobject". 

    QueryExpression query = new QueryExpression
                            {
                                EntityName = "activitypointer",
                                ColumnSet = new ColumnSet(true),
                                Criteria = new Microsoft.Xrm.Sdk.Query.FilterExpression()
                            };
                            FilterExpression childFilter = query.Criteria.AddFilter(LogicalOperator.And);
                            childFilter.AddCondition("regardingobjectid", ConditionOperator.Equal, regardingObject.Id);
                            childFilter.AddCondition("statecode", ConditionOperator.Equal, ActivityPointerState.Completed);

    How should I change the request now to get all the actions that are completed, since I cannot use the ActivityPointerState?

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Can't create correct ActivityPointer class for plagin using Developer Toolkit for Dynamics365

    As you may aware Activity (activitypointer) is special entity - it’s a bucket to store all sort of activities including custom activities, it will have only common attributes across activity types like email, fax, phonecall, etc.

    It supports only limited messages like Retrieve, RetrieveMultiple. Whatever you want to do with activities you may have to deal with particular activity type entity like email, appointment, etc

    docs.microsoft.com/.../activitypointer

    Not sure what you want to achieve with activitypointer and if you can share your requirement and the method you are seeing in class generator, we can comment on them.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans