Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Get The Users whose are currently working on Cases

Posted on by 932

Scenario is First, I want to show the status of cases in SQL Server. In Status field there is no value to show the case is open i guess.

So how could i get that how many cases are open and their user name?

*This post is locked for comments

  • RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Get The Users whose are currently working on Cases

    Hi Shakti,

    How did you get on with this? If you have got your answer, please close the thread by mark the suggestion as answer if it helped you

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Get The Users whose are currently working on Cases

    Hi Shakti,

    You have tagged your question as CRM Online. If it is correct and you are on CRM Online then you can't access SQL. If you are on premise, you can follow above suggestions.

    Hope this helps.

  • RE: Get The Users whose are currently working on Cases

    Could you please elaborate?

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Get The Users whose are currently working on Cases

    To get the label names in sql query you might have to perform a join operation on a stringmap table.

    However i would recommend you to use simple like below.

    1. open the attribute "Case_Status" from customiziation and see what value(integer) represent open and what  represents a close case:

    then simply run the below query:

    Select Case_Status, count(Case_Status) as CountOFCases from incident

    group by Case_Status

    make sure the field name is correct.

  • Suggested answer
    Abdul Wahab Profile Picture
    Abdul Wahab 12,070 Super User 2024 Season 1 on at
    RE: Get The Users whose are currently working on Cases

    Hi  Shakti Singh Rajput,

    Use advanced find view. I think this will solve your problem. Feel free to ask more.

    Thanks

    Regards,

    AW

  • RE: Get The Users whose are currently working on Cases

    Thanks for response Rawish,

    I want to display that which cases are open state and close state.

    Like,  I had a custom field "Case_Status" which is blank initially. When I am open a case record within the list of case records then the value of "Case_Status" field is assigned to 'Opened' and if the case is closed(Resolved) then update the field value to Closed.

    How could i get the same?

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Get The Users whose are currently working on Cases

    Hi Shakti,

    Would you mind explaining bit more on " In Status field there is no value to show the case is open i guess.".

    However if i understood your second line correctly - all you need is below :

    Select OwnerIdName, count(incidentid) as CountOFCases from incident
    where statecode = 0
    group by OwnerIdName

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans