• Gerry_Marletta
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 1
    Replies
Hello,

Yesterday I started receiving a very vague error message when trying to save a new copy of a Flow.  This is with no changes to the Flow at all since the last succesful change - just getting a fresh copy saved before I start making any changes.  The error message reads "Eror - We're sorry, but a serious error occurred.  Please don't close the Cloud Flow Designer window.  Contact Salesforce Customer Support as soon as possible."  Screenshot below

I've contacted SFDC support and they told me I needed to post this here...

User-added image
Hello,

I have a custom button on Contacts that creates a new activity and prepoulates a number of fields to speed up loggin a voicemail for our Sales reps. The URL for the button is:  
/00T/e?followup=1&title=Call&retURL=%2F{!Contact.Id}&who_id={!Contact.Id}&what_id={!Account.Id}&tsk5=Call - Voicemail
&tsk6=Left+a+voicemail+for+{!Contact.Name}&00N40000001rbkJ=Call&00N40000002J1Md=Voicemail&save=x

We've not had a problem with it for close to a year, now all of a sudden when pressed, it takes us to the edit screen with the following error:
"Error: Invalid Data.
Review all error messages below to correct your data.
The page you submitted was invalid for your session. Please click Save again to confirm your change."

Any reason why this would start happening all of a sudden?
Hi everyone,

Our company is in a situation where we had to sever ties with a developer, and the developer was using our administrators sandbox login information.  We were able to reset our admins password - however the development work the developer was doing for us is still trying to log in every 5 minutes to refresh data, using our admins account.  Our admins sandbox account is now ALWAYS locked - we can unlock by having another admin login to the sandbox, but after 5 mins the account locks again.  Is there a way to change the sandbox name so "admin@company.com.sandboxname" becomes "admin@companyname.differentsandboxname"?

We have recently started using Parent/Child Account relationships in Salesforce, and have a filtered Roll-Up field to sum live open Opps with Accounts. We wanted to be able to sum that field on all child Accounts to the Parent level, so I found an Apex Class and Trigger on line that seemed like it would work.

 

However, every time an edit is made to any Account record in Salesforce, I receive a gov limit warning:

 

"Approaching limit for non-selective query against large object type (more than 100000 rows). Current size is approximately 94107 rows. When the limit is reached, the query will fail. "

 

I know this is because it's querying all Accounts (since we have approximately 94,100 Account records) every time it runs, but I am not yet comfortable enough with the Apex language to know what I need to do to prevent it from querying every Account record every time.

 

Below is the Class and the Trigger we have. Any help is greatly appreciated as I learn by trial and error.

 

CLASS:

public class RollUpSummaryUtility {
     
    //the following class will be used to house the field names
    //and desired operations
    public class fieldDefinition {
        public String operation {get;set;}
        public String childField {get;set;}
        public String parentField {get;set;}
         
        public fieldDefinition (String o, String c, String p) {
            operation = o;
            childField = c;
            parentField = p;
        }
    }
     
    public static void rollUpTrigger(list<fieldDefinition> fieldDefinitions,
    list<sObject> records, String childObject, String childParentLookupField,
    String parentObject, String queryFilter) {
         
        //Limit the size of list by using Sets which do not contain duplicate
        //elements prevents hitting governor limits
        set<Id> parentIds = new set<Id>();
         
        for(sObject s : records) {
            parentIds.add((Id)s.get(childParentLookupField));
        }
         
        //populate query text strings to be used in child aggregrator and
        //parent value assignment
        String fieldsToAggregate = '';
        String parentFields = '';
         
        for(fieldDefinition d : fieldDefinitions) {
            fieldsToAggregate += d.operation + '(' + d.childField + ') ' +
            ', ';
            parentFields += d.parentField + ', ';
        }
         
        //Using dynamic SOQL with aggergate results to populate parentValueMap
        String aggregateQuery = 'Select ' + fieldsToAggregate +
        childParentLookupField + ' from ' + childObject + ' where  ' +
        childParentLookupField + ' IN :parentIds ' + queryFilter + ' ' +
        ' group by ' + childParentLookupField;
         
        //Map will contain one parent record Id per one aggregate object
        map<Id, AggregateResult> parentValueMap =
        new map <Id, AggregateResult>();
         
        for(AggregateResult q : Database.query(aggregateQuery)){
            parentValueMap.put((Id)q.get(childParentLookupField), q);
        }
         
        //list of parent object records to update
        list<sObject> parentsToUpdate = new list<sObject>();
         
        String parentQuery = 'select ' + parentFields + ' Id ' +
         ' from ' + parentObject + ' where Id IN :parentIds';
         
        //for each affected parent object, retrieve aggregate results and
        //for each field definition add aggregate value to parent field
        for(sObject s : Database.query(parentQuery)) {
             
            Integer row = 0; //row counter reset for every parent record
            for(fieldDefinition d : fieldDefinitions) {
                String field = 'expr' + row.format();
                AggregateResult r = parentValueMap.get(s.Id);
                //r will be null if no records exist
                //(e.g. last record deleted)
                if(r != null) {
                    Decimal value = ((Decimal)r.get(field) == null ) ? 0 :
                        (Decimal)r.get(field);
                    s.put(d.parentField, value);
                } else {
                    s.put(d.parentField, 0);
                }
                row += 1; //plus 1 for every field definition after first
            }
            parentsToUpdate.add(s);
        }
         
        //if parent records exist, perform update of all parent records
        //with a single DML statement
        if(parentsToUpdate.Size() > 0) {
            update parentsToUpdate;
        }
         
    }
 
}

 TRIGGER:

 

trigger CustomeParentAccountRollUpOpenOpps on Account (after delete, after update) {
     
    if(trigger.isUpdate){
         
        list<RollUpSummaryUtility.fieldDefinition> fieldDefinitions =
        new list<RollUpSummaryUtility.fieldDefinition> {
            new RollUpSummaryUtility.fieldDefinition('SUM', 'Live_Open_Opp__c',
            'Child_Account_Open_Opp_Dollars_Trigger__c')
        };
         
        RollUpSummaryUtility.rollUpTrigger(fieldDefinitions, trigger.new,
        'Account', 'Parent_Account_Custom__c', 'Account', '');
         
    }
     
    if(trigger.isDelete){
         
        list<RollUpSummaryUtility.fieldDefinition> fieldDefinitions =
        new list<RollUpSummaryUtility.fieldDefinition> {
            new RollUpSummaryUtility.fieldDefinition('SUM', 'Live_Open_Opp__c',
            'Child_Account_Open_Opp_Dollars_Trigger__c')
        };
         
        RollUpSummaryUtility.rollUpTrigger(fieldDefinitions, trigger.old,
        'Account', 'Parent_Account_Custom__c', 'Account', '');
         
    }
     
}

 

Hello,

I have a custom button on Contacts that creates a new activity and prepoulates a number of fields to speed up loggin a voicemail for our Sales reps. The URL for the button is:  
/00T/e?followup=1&title=Call&retURL=%2F{!Contact.Id}&who_id={!Contact.Id}&what_id={!Account.Id}&tsk5=Call - Voicemail
&tsk6=Left+a+voicemail+for+{!Contact.Name}&00N40000001rbkJ=Call&00N40000002J1Md=Voicemail&save=x

We've not had a problem with it for close to a year, now all of a sudden when pressed, it takes us to the edit screen with the following error:
"Error: Invalid Data.
Review all error messages below to correct your data.
The page you submitted was invalid for your session. Please click Save again to confirm your change."

Any reason why this would start happening all of a sudden?

Hi all,

 

I have a multipicklist field called that has 2 possible values:

 

Sales

Support

 

When using Flow and setting up a dynamic choice to pull:

 

AccountId equals {!v_AccountID}  (this works) and

Contact_Type_c contains Support  (this is not working)

 

It works if I set Contact_Type_c EQUALS Support - that pulls any records whose Contact_Type_c multipicklist value is "Support" but the "contains" doesn't find any records.  It doesn't find those that only have "Support" and it doesn't find those that have a value of "Sales; Support".

 

Anyone else have this problem?

 

Chopkins