web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Next task activity date and subject for case

(0) ShareShare
ReportReport
Posted on by 1,570

I am working on a solution to store next activity date and subject for the case entity within the case.  

I want to store the next open task due date and subject for a case and store with the case.  I can create a min rollup field for the date fairly easy but the subject is not as easy.  

I am currently working on a plug-in for this. But has anyone done this without plugin?

I have found similar posts for this with opportunities but no complete answer.

Thanks. Tom.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Royal King Profile Picture
    27,686 on at

    you could use workflow to update these fields whenever new task is created for a case. This way always these 2 fields will have last activity date and subject.

  • TomSmelser Profile Picture
    1,570 on at

    I looked at that.  The date and subject have to be the next scheduled.  I figured out how to store the last updated task and I can compare to the date on the case if the nextTaskDate on the case is later then I store the newer task info. But the trick is when a task is completed or deleted you now have to loop over all remaining scheduled tasks and get the next one to store with the case. Can you do that in a workflow ?

  • Royal King Profile Picture
    27,686 on at

    Not with OOB you need to write custom Workflow step to do that. Workflow does not allow to retrieve 1:N relationship records.

  • TomSmelser Profile Picture
    1,570 on at

    Ok. Is a custom workflow step done via a plug-in ?

  • Royal King Profile Picture
    27,686 on at

    Nope. Its very similar to plugin check crm sdk sample to create new custom workflow step that will provide all the details to create new  custom workflow.

    check belwo post that shows step by step to create custom workflow

    mahenderpal.wordpress.com/.../step-by-step-creating-custom-workflow-in-microsoft-crm-2011

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Tom

    So here you have case and activity?

    So everytime you create activity, you want to store that in the case?

    Or everytime you create case then you create activity?

  • TomSmelser Profile Picture
    1,570 on at

    Aileen,

    Close to the 2nd one... if  you create activity, you want to store that tasks subject and date in the case. But the trick is to only store it if it is the next open task by due date.  So that last task I add may not be the next due date.  I may have 5 open tasks with different due dates.  If I open a task for a case and change it's due date or close it, it may no longer be the next due task, so I will have to adjust the task info stored with the case.  A looping scenario. Again I can do this with a plugin. Just wondering if it's possible with process config.  Sounds like maybe not.

  • Community Member Profile Picture
    on at

    Couldn't you do this by setting up a workflow on each activity type (task, phone call, appt, etc) that fires when an activity is created or the due date changes?  In that workflow, check to see if the activity is regarding an open case.  If it is, then check to see if that activity's due date is < the value in your field that stores the regarding case record's next activity due date, or the the regarding case record's next activity due date field is not set.  If so, update the regarding case by storing that activities due date and subject as you desire.

    You would have to create this same workflow for each activity type you wanted to support for this functionality, and someone else might be able to speak to the overhead involved in having this workflow fire for each activity that is created or has it's due date adjusted, but I think it will do what you want without custom development.

     

     

     

     

     

  • TomSmelser Profile Picture
    1,570 on at

    Thanks all for replies.  I have coded a plug-in for this.

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi Tom

    Yup

    And for the date itself i think you can do pretty easy just using rollup field with operator MAX and filter only if Task is still open only which I believe you have done it.

    If for the subject.

    Since there is no aggregate operator for string then you cant use the rollup field.

    And the rollup field you made for the date scheme you cannot use also to trigger workflow (crm limitation).

    And actually everytime task created you can update the case subject (because case is the parent) but again in crm workflow you cant do query to the task to find which task is reaching the due date soonest.

    Especially you want to have another logic if complete it then change to another task.

    This is definitely crm workflow can be triggered by completion status but you cant query again againts to the task records  because you cant do query in workflow.

    As a workaround of course plugin or custom workflow activity would help you.

    But another around you can also do:

    What if you put a subgrid in the case form for the case.

    Then you sort by the due date and show only open task?

    When user open the case form they can see how many tasks they have still open and when is the due date.

    Hope this helps.

    THanks.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans