• Ksenia Choate
  • NEWBIE
  • 15 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 4
    Replies
I edited SAQL to show month name instead of number in a dashboard step, using a case statement. The steps groups case records by Created Month and limits the data to cases created last and current month. The month name now shows up as expected (e.g., "December" instead of "12"), but the toggle using the step doesn’t facet properly. I am not a developer, and put together the case statement based on examples I found on the internet. I am clearly missing something, and I don’t understand every piece of code I have, so troubleshooting has been very much trial and error, but now I ran out of options.

Here is the code from an out-of the box step that shows month numbers and that works properly:
 
q = load "ServiceCase";
q = filter q by date('CreatedDate_Year', 'CreatedDate_Month', 'CreatedDate_Day') in ["1 month ago".."current month"];
q = group q by 'CreatedDate_Month';
q = foreach q generate 'CreatedDate_Month' as 'CreatedDate_Month', count() as 'count';
q = order q by 'count' desc;
q = limit q 2000;

Here is my code that shows month names and doesn’t facet properly:
q = load "ServiceCase";
q = filter q by date('CreatedDate_Year', 'CreatedDate_Month', 'CreatedDate_Day') in ["1 month ago".."current month"];
q = group q by 'CreatedDate_Month';
q = foreach q generate (case when 'CreatedDate_Month' in ["01"] then "January" when 'CreatedDate_Month' in ["02"] then "February" when 'CreatedDate_Month' in ["03"] then "March" when 'CreatedDate_Month' in ["04"] then "April" when 'CreatedDate_Month' in ["05"] then "May" when 'CreatedDate_Month' in ["06"] then "June" when 'CreatedDate_Month' in ["07"] then "July" when 'CreatedDate_Month' in ["08"] then "August" when 'CreatedDate_Month' in ["09"] then "September" when 'CreatedDate_Month' in ["10"] then "October" when 'CreatedDate_Month' in ["11"] then "November" when 'CreatedDate_Month' in ["12"] then "December" else "N/A" end) as 'CreatedDate_Month', count() as 'count';
q = order q by 'count' desc;
q = limit q 2000;

And by "it doesn't facet properly," I mean that when I click on the month name in the toggle, all widgets display the "No reults found" message. When I click on the same month name again, it does the same as the "Reset" feature, i.e., returts all widgets into their default position. When I click on the same month name the thrid time, I get the "No reults found" message again, etc.

Could someone please help me understand what I am doing wrong? Any help would be greatly appreciated. Thank you so very much in advance!
 

I need to be able to show a subset of case fields to users who don't own those cases. They have full CRED to cases and thus full rights to cases they own, but for the cases they don't own, they should be able to see a handful of fields (not all of them). OWD for cases is Private.

My original solution was to create a custom object that would mimic the case fields that should be public and make that object's OWDs Public Read-Only. The object would have a lookup field to the case (so that the data can be pulled from the case and into this object via the Process Builder) as well as to accounts and contacts (so that the records of this object would show up in related lists on accounts and contacts). I posted this solution on the success community to see if anyone had a more elegant solution and someone suggested that using Visualforce would be easier. (Link to the success community post: https://success.salesforce.com/answers?id=9063A000000pHkMQAU).

I know next to nothing about VF (not a developer), but happy to learn, at least enough to try to build this thing. I've been looking at this: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_display_field_values.htm and this: https://salesforce.stackexchange.com/questions/65623/expose-a-child-objects-vf-page-in-parent-objects-page-layout and it looks like I could create a custom VF component that would include the case fields in question and place it on account and contact page layouts as a related list of sorts.This component would basically have to pull select case fields and display them to all users, regardless of case OWDs.

I have the following questions in conjunction with all of this:

  1. Is what I described possible?
  2. If it is, are the two linked resources enough to help me figure it out, or is there anything else I should study?
  3. How does security work for VF components? Can I just add it to people's profiles to make the data displayed in them visible to all, even though case OWDs normally restrict them from seeing those fields?
  4. What happens when you have multiple case records, too many to fit into the component? Do you set the VF componenet's hight and then if the records don't fit within the specified height, a scroll bar appears?
  5. Will this VF page work in the context of a service cloud console (e.g., if someone is looking at an account or contact page in the console, will the VF component be rendered properly, or would a separate component have to be designed for the console)?


Thank you in advance!!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

I edited SAQL to show month name instead of number in a dashboard step, using a case statement. The steps groups case records by Created Month and limits the data to cases created last and current month. The month name now shows up as expected (e.g., "December" instead of "12"), but the toggle using the step doesn’t facet properly. I am not a developer, and put together the case statement based on examples I found on the internet. I am clearly missing something, and I don’t understand every piece of code I have, so troubleshooting has been very much trial and error, but now I ran out of options.

Here is the code from an out-of the box step that shows month numbers and that works properly:
 
q = load "ServiceCase";
q = filter q by date('CreatedDate_Year', 'CreatedDate_Month', 'CreatedDate_Day') in ["1 month ago".."current month"];
q = group q by 'CreatedDate_Month';
q = foreach q generate 'CreatedDate_Month' as 'CreatedDate_Month', count() as 'count';
q = order q by 'count' desc;
q = limit q 2000;

Here is my code that shows month names and doesn’t facet properly:
q = load "ServiceCase";
q = filter q by date('CreatedDate_Year', 'CreatedDate_Month', 'CreatedDate_Day') in ["1 month ago".."current month"];
q = group q by 'CreatedDate_Month';
q = foreach q generate (case when 'CreatedDate_Month' in ["01"] then "January" when 'CreatedDate_Month' in ["02"] then "February" when 'CreatedDate_Month' in ["03"] then "March" when 'CreatedDate_Month' in ["04"] then "April" when 'CreatedDate_Month' in ["05"] then "May" when 'CreatedDate_Month' in ["06"] then "June" when 'CreatedDate_Month' in ["07"] then "July" when 'CreatedDate_Month' in ["08"] then "August" when 'CreatedDate_Month' in ["09"] then "September" when 'CreatedDate_Month' in ["10"] then "October" when 'CreatedDate_Month' in ["11"] then "November" when 'CreatedDate_Month' in ["12"] then "December" else "N/A" end) as 'CreatedDate_Month', count() as 'count';
q = order q by 'count' desc;
q = limit q 2000;

And by "it doesn't facet properly," I mean that when I click on the month name in the toggle, all widgets display the "No reults found" message. When I click on the same month name again, it does the same as the "Reset" feature, i.e., returts all widgets into their default position. When I click on the same month name the thrid time, I get the "No reults found" message again, etc.

Could someone please help me understand what I am doing wrong? Any help would be greatly appreciated. Thank you so very much in advance!
 

I need to be able to show a subset of case fields to users who don't own those cases. They have full CRED to cases and thus full rights to cases they own, but for the cases they don't own, they should be able to see a handful of fields (not all of them). OWD for cases is Private.

My original solution was to create a custom object that would mimic the case fields that should be public and make that object's OWDs Public Read-Only. The object would have a lookup field to the case (so that the data can be pulled from the case and into this object via the Process Builder) as well as to accounts and contacts (so that the records of this object would show up in related lists on accounts and contacts). I posted this solution on the success community to see if anyone had a more elegant solution and someone suggested that using Visualforce would be easier. (Link to the success community post: https://success.salesforce.com/answers?id=9063A000000pHkMQAU).

I know next to nothing about VF (not a developer), but happy to learn, at least enough to try to build this thing. I've been looking at this: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_display_field_values.htm and this: https://salesforce.stackexchange.com/questions/65623/expose-a-child-objects-vf-page-in-parent-objects-page-layout and it looks like I could create a custom VF component that would include the case fields in question and place it on account and contact page layouts as a related list of sorts.This component would basically have to pull select case fields and display them to all users, regardless of case OWDs.

I have the following questions in conjunction with all of this:

  1. Is what I described possible?
  2. If it is, are the two linked resources enough to help me figure it out, or is there anything else I should study?
  3. How does security work for VF components? Can I just add it to people's profiles to make the data displayed in them visible to all, even though case OWDs normally restrict them from seeing those fields?
  4. What happens when you have multiple case records, too many to fit into the component? Do you set the VF componenet's hight and then if the records don't fit within the specified height, a scroll bar appears?
  5. Will this VF page work in the context of a service cloud console (e.g., if someone is looking at an account or contact page in the console, will the VF component be rendered properly, or would a separate component have to be designed for the console)?


Thank you in advance!!