• Ines Cortes
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
After haivng used salesforce for several years and too many users having access to create public list views, it is time to clean them up. I am trying to run a query to find out when a list view was last viewed. I know there is a lastvieweddate field, however, when you run the query, it shows when you, the user running the query, have last used that view. It could have been used by another user 5 minutes ago though but if I am running the query, that is not reflected.

So how could I go about finding out when a public list view was last viewed by ANY user in the org? The end goal is to delete any public views that have not been used for more than let's say 4 months by any user.

Opened a SFDC support case and was told that this is not standard functionality and to post on the forum here to see if anyone has any ideas and/ or to post it as an idea.

Any help would be much appreciated.
I have some custom Apex classes that are failing to save Opportunitty records when a certain flow is enabled in the process builder. When I disable the process in Process Builder, everything starts working again.

The error I get is:
Update failed. First exception on row 0 with id 0063800000WBq80AAD; first error: CANNOT_EXECUTE_FLOW_TRIGGER, The record couldn’t be saved because it failed to trigger a flow.

java.lang.IllegalArgumentException: unable to find field dataType for complex reference

Error is in expression '{!saveOpp}' in page editexecutivesummary: Class.OpportunityExecutiveSummaryController.saveOpp: line 128, column 1
I need some help figuring out why my Apex class is failing on all opportunities in any stage, as my process in Process Builder is not even suppose to fire until 'Closed Won' is TRUE.

The methos that is failing:
//METHOD: THAT SAVE THE OPPORTUNITY AND CALL THE CONGA MERGE.
    public PageReference saveOpp(){
        if(exe_summary != null && exe_summary.trim().length() > 0){
            opp.Executive_Summary_R__c = exe_summary;
            //exe_summary = exe_summary.replace('<p>','').replace('</p>','\n').replace('<br />','\n').replace('<br>','\n').replace('\'','');
            //exe_summary = exe_summary.replace('<[^>]+>',' ').replace('&amp;','&').replace('&lt;','<').replace('&gt;','>').replace('&quot;','"').replace('&#39;','\'').replace('&nbsp;',' ');
            opp.Executive_Summary__c = mergeFieldValues(exe_summary);            
        }
        
        if(!checkDouble(String.ValueOf(opp.Estimated_Travel_Costs__c))){
            opp.Estimated_Travel_Costs__c = 0;
        }
        update opp;
        return new PageReference('/apex/EditExecutiveSummary?updated=true&id='+opp_id).setRedirect(true);
    }