Ask Search:
Erin HeiserErin Heiser 

I just ran the Salesforce Optimizer report and was shocked to see that I had 610 unused reports (reports that have not been viewed in the past 12 months).  However, when looking through the list, I saw several reports that are being used for dashboards, dashboards that I know are being viewed. So, can I assume then that no one has clicked through the dashboard component and viewed the report directly?

Also, in my Salesforce Optimizer report there were a few dashboards listed as unused.  I confirmed with one user that her dashbaord actually is viewed on a daily basis but only on her home page, not on the Dashboards tab.

With these small quirks with the report I suggest that you really evaluate each report or dahsboard for actual use before deleting!   

Best Answer chosen by Erin Heiser
EdEd (salesforce.com) 
Hi Erin,

This coud be related to the known issue posted below:

https://success.salesforce.com/issues_view?id=a1p3A0000001CfDQAU

Thanks!
Todd KadasTodd Kadas 
Hoping someone can help me out.  I'm a bit new here.  Error message and Apex class provided below.  I have a trigger that fires after a user creates a new note in Notes & Attachment resulting in a task being created.  Below script then populates fields in the task to complete it.  Works fine when notes are created in Accounts and Opportunities but throws below error when notes are created in Leads or Contacts.  

If you're scratching your head around why this would have been created, it's that several of our users complained that they weren't getting credit for activities they perform throughout the week, such as updating account data with notes.  By using this, when management reviews their teams activities, each note is counted as 1 activity.

Apex script unhandled trigger exception by user/organization: 005o0000001aU9R/00D0m000000CmUV Source organization: 00Do0000000ZWI0 (null)
NotesTrigger: execution of AfterInsert
 
caused by: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, Related To ID: id value of incorrect type: 00Qo000000UcO86EAF: [WhatId]
 
Class.NotesHandler.onAfterInsert: line 54, column 1
Trigger.NotesTrigger: line 14, column 1
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
*\arg ClassName    :NotesHandler
*\arg CreatedOn    :
*\arg LastModifiedOn    :
*\arg CreatedBy    :
*\arg ModifiedBy    :
*\arg Description    :Handler class to create task after notes are inserted
*/
public with sharing class NotesHandler
{
    /*Start - Constructor*/
    public NotesHandler()
    {
        //do nothing
    }
    /* End - Constructor*/
    
    /**
    @MethodName    :onAfterUpdate
    @Param    :
    @Description:
    **/
    public void onAfterInsert(List<Note>lstNote)
    {
    String userID=UserInfo.getUserId();
    List<Task>lstTask=new List<Task>();
    for(Note objNote :lstNote)
    {
        Schema.SObjectType objType=objNote.parentId.getSobjectType();
        String strObjType = objType+' ';
        if( strObjType != 'Task')
        {
        Task objTask = new Task();
        objTask.Subject = 'Note created -'+objNote.Title;
        objTask.Priority = 'Normal';
        objTask.Type = 'Note created';
        objTask.Status = 'Completed';
        objTask.ActivityDate = objNote.CreatedDate.Date();
        objTask.Task_Completion_Date__c = objNote.CreatedDate;
        if(strObjType=='Contact'||strObjType=='Lead')
        ObjTask.WhoId=objNote.parentId;
        else
        objTask.WhatId = objNote.parentId;
        objTask.OwnerId = userId;
        
        lstTask.add(objTask);
        
        }
   
        
    }
     
     if(!lstTask.isEmpty())
         insert lstTask;
    }
    
    
}



 
Best Answer chosen by Todd Kadas
Todd KadasTodd Kadas
Thanks so much, Puneet. That solved it. 
Cheryl WardCheryl Ward 
I need to print out several case's chatter postings and the "printable view" doesn't include them.  The Chatter dashboard and reports doesn't do the trick, either.

Any thoughts?

Thanks in advance, Cheryl
Best Answer chosen by Cheryl Ward
Puneet MehtaPuneet Mehta
Hi Cheryl,

Please use the browser printing option to print out as the Salesforce wouldn't allow printing using the printable view.
Dorota Czapla-NiznikDorota Czapla-Niznik 
Hi,

I am trying to create report of opportunities based on Deal ID. Unfortunately some opportunities do not have Deal ID.  Could you explain how Deal ID is generated and what could be the  reason that some opportunities do not have Deal ID.  Thank you in advance.
Best Answer chosen by Dorota Czapla-Niznik
Puneet MehtaPuneet Mehta
Hi Dorota,

Are you a System Administrator in your Salesforce Org? If not, it is best to consult your System Administrator.
Phani PYDIMARRYPhani PYDIMARRY 
Hi,
I am trying to connect a report to a visualforce page. I have somehow managed to replicate previous links. Can someone please explain me whats happening in this code?
 
<li><apex:outputLink value="{!$Site.prefix}/{!$Label.Top_20_Non_Managers_GLOBAL}?pv0={!accDistId}">Top 20 Non-Managers (GLOBAL)</apex:outputLink>
<apex:outputLink styleClass="button gold pull-right" value={!$Site.prefix}/{!$Label.Top_20_Non_Managers_GLOBAL}?pv0={!accDistId}">{!$Label.PD_Reports_View}</apex:outputLink></li>
<li><apex:outputLink value="{!$Site.prefix}/{!$Label.Top_20_Managers_GLOBAL}?pv0={!accDistId}">Top 20 Managers (GLOBAL)</apex:outputLink>
<apex:outputLink styleClass="button gold pull-right" value="{!$Site.prefix}/{!$Label.Top_20_Managers_GLOBAL}?pv0={!accDistId}">{!$Label.PD_Reports_View}</apex:outputLink></li>

 
Best Answer chosen by Phani PYDIMARRY
Puneet MehtaPuneet Mehta
Hi Phani,

<apex:outputlink> display a URL/link to report and pv0 is used to pass a value as paremeter.
{!$Label.Top_20_Non_Managers_GLOBAL} is custom labels which holds the Salesforce Id of Report.
$Site.Prefix Returns the URL path prefix of the current site. For example, if your site URL ismyco.force.com/partners, /partners is the path prefix. Returns null if the prefix isn’t defined. If the current request is not a site request, then this field returns an empty string.

More Info:
http://www.salesforceben.com/salesforce-reports-url-hack/
Jeffrey ForbesJeffrey Forbes 
I have a matrix report that I would like to include on public dashboard. I am unable to do some because when I go to add a component I get the error "Unsupported Report Type".

I am not trying to use a tabular report as in this case and other forum cases https://success.salesforce.com/answers?id=9063A0000019O0MQAU
Best Answer chosen by Miglena (Salesforce.com) 
Daniel GlogowskiDaniel Glogowski
Hi everyone, this issue will be resolved in Summer '17. Pleae let us know if you have any further questions. Thanks!
 
Swapna MistrySwapna Mistry 
I have a report and I am able to export it without any issues in Classic. 

In Lightning, when I click the Export button, nothing happens. 

Does anyone know why?

User-added image
Best Answer chosen by Swapna Mistry
Swapna MistrySwapna Mistry
Resolved. The Report ID in the formula field needs to include the additional 3 case safe characters. I've updated it and verified that the export is now working. 
 
HYPERLINK("#/sObject/00O31000006oY44EAE/view?fv0="& Id, "Click here for Items in Production Report")
Jacques GauthierJacques Gauthier 
Hello everyone!

Does anyone know how to build a report with a time frame "This Day Last Year"?  Something like ((Today)-365).  I am trying to run a report for activity that occured the same day last year (and possibly years prior).

Alternatively, I would also welcome "this week last year".

Your help is appreciated.
J.
Best Answer chosen by Jacques Gauthier
Steve DoddSteve Dodd

Try using two date filters:

DateField greater than 365 DAYS AGO
and
DateField less than last 358 DAYS AGO

Pat McAbeePat McAbee 
I need to create a report that will show all accounts that have not had any sales in the previous 12 months. Any help would be much appreciated.

Thanks!
Best Answer chosen by Miglena (Salesforce.com) 
James GarfieldJames Garfield
Hey Pat,

If you are looking for a report to show accounts that havent had activity in the last 12 months you can just replicate the below screen shot. Just run the report based on accounts. When you say sales within the previous 12 months are you saying that there is an activity stored for this? 


Best of luck!
User-added image

I dont have any accounts w/ activities later than that date but if I did they would appear!

Chadia MokhchaneChadia Mokhchane 
Hi all,

I've build an opp product report. I have a specific field named 'terminal", in the report output the system shows me a certain number of accounts without a terminal. When I look at the account page, a terminal is entered in the field. What could be the issue?

Best,
Chadia
Best Answer chosen by Chadia Mokhchane
Ataul AliAtaul Ali
The reason could be that the custom field 'Terminal' is not added to the Custom Report type which is being used.

The way to do it is as follow:

Quick Find -> Report Type -> Then from the list of the report Type find the report type which you are currently using and click the to open 

Go Down to fields available for report section  and click edit layout. And the field 'Terminal'.

User-added image