locked
Sum Regarding Activities Duration in Case Entity - CRM2011 RRS feed

  • Question

  • Hi - new at jscript but in CRM4 we had some jscript which allows me to track  "closed regarding activities" time spent (duration of all closed activities in hours) on an OPEN case.

     

    Does anyone have any idea how to do this for crm 2011?

    Monday, December 5, 2011 12:08 AM

Answers

  • You need to use Json script to retrieve the activities and then perform the sum.

    You can refer the SDK for sample code.

    HTH

    Sam


    Web: http://www.inogic.com
    Blog: http://inogic.blogspot.com
    Email: news@inogic.com
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    • Marked as answer by E Fletcher Thursday, March 1, 2012 2:20 AM
    Monday, December 5, 2011 4:14 AM
  • Hi Fletcher

    Adding to the notes of SAM ,

     Or you can get the Activity using FETCHXML () and then loop thru them  Sum them while traversing them.

    Please find the link demonstrating example of fetchxml

     http://techdetector.wordpress.com/2010/10/07/fetch-xml-and-javascript-in-crm-4-0/

    fetchxml builder

    http://fetchxmlbuilder.codeplex.com/

    there is also great tool from stuntware fetch xml wizard

    http://www.stunnware.com/crm2/

    hope this helps

    Dkay

     if the response answered your question, please take a minute and mark the response as an answer.

    • Marked as answer by E Fletcher Thursday, March 1, 2012 2:20 AM
    Monday, December 5, 2011 11:10 AM

All replies

  • You need to use Json script to retrieve the activities and then perform the sum.

    You can refer the SDK for sample code.

    HTH

    Sam


    Web: http://www.inogic.com
    Blog: http://inogic.blogspot.com
    Email: news@inogic.com
    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer".
    • Marked as answer by E Fletcher Thursday, March 1, 2012 2:20 AM
    Monday, December 5, 2011 4:14 AM
  • Hi Fletcher

    Adding to the notes of SAM ,

     Or you can get the Activity using FETCHXML () and then loop thru them  Sum them while traversing them.

    Please find the link demonstrating example of fetchxml

     http://techdetector.wordpress.com/2010/10/07/fetch-xml-and-javascript-in-crm-4-0/

    fetchxml builder

    http://fetchxmlbuilder.codeplex.com/

    there is also great tool from stuntware fetch xml wizard

    http://www.stunnware.com/crm2/

    hope this helps

    Dkay

     if the response answered your question, please take a minute and mark the response as an answer.

    • Marked as answer by E Fletcher Thursday, March 1, 2012 2:20 AM
    Monday, December 5, 2011 11:10 AM
  • There are multiple ways to do it.

    Use javascipt as suggested by Sam and crm developer.

    Create plugin or setstate/setdynamic state of the activity. get the case guid from regardingobjectid and then get all the closed activity time and update the custom total time field on case entity.

    I hope this helps.

     


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Amreek Singh Senior CRM Consultant CDC Praxa Sydney, Australia http://mscrmshop.blogspot.com http://crm2011usersettings.codeplex.com
    • Proposed as answer by Philippe LEAL Monday, December 5, 2011 2:43 PM
    Monday, December 5, 2011 11:30 AM
  • Hi

    Did this help?

    Please make sure to mark as answer to the response that helped you get through. This will help others with similar problem identify the answer and also close this thread as resolved.

    Thanks

    Dkay

    Thursday, December 8, 2011 2:00 PM