• Rachel Linder 8
  • NEWBIE
  • 70 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 46
    Replies
I have written process builder flow for an email alert. The first set of criteria is met to send an email alert the first time the criteria is met. The second set of criteria is met to send an email any time the fields change after the initial criteria being sent. Right now it is skipping the initial criteria alert and only sending the ischanged criteria. Not sure what to do to correct this.

Initial Criteria to be Met to Send Initial Email
User-added image
Initial Crtieria Above defined
Initial Criteria:
 
  1. Stage Name equals Closed Won
  2. Foot Traffic Reports equals DAP
  3. Foot Traffic Reports equals DAP2
  4. Foot Traffic Reports equals DAP3
  5. Cross-Channel Reports Is Null False
  6. MTA Reports Is Null False
  7. TV Reports equals Grace
  8. TV Reports equals Tune
  9. Measurement Reports Offered equals Yes
  10. Record Type Name equals Viant MS
  11. Last Modified Profile ID equals xxxxx1
  12. Last Modified Profile ID equals xxxxx2
Filter Logic
(1 AND 9 AND 10 AND (11 OR 12)) AND (2 OR 3 OR 4 OR 5 OR 6 OR 7 OR 8)

Advanced is checked as yes

IsChanged Criteria after Initial Criteria being met
User-added image
Below is my current formula field used in a field update WFR.
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"NCS"), 
ISPICKVAL(Direct_Match_Vendor__c,"NCS")), 
"NCS", 
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Comscore"), 
ISPICKVAL(Direct_Match_Vendor__c,"Comscore")), 
"Rentrak", 
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Experian"), 
ISPICKVAL(Opportunity.Data_Partners_EU_Entire_Campaign__c, "Experian"),
ISPICKVAL(Direct_Match_Vendor__c,"Experian"),
ISPICKVAL(Data_Partners_EU__c, "Experian")), 
"Experian", 
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Argus"), 
ISPICKVAL(Direct_Match_Vendor__c,"Argus")), 
"Argus", 
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_EU_Entire_Campaign__c,"Epsilon"), 
ISPICKVAL(Data_Partners_EU__c, "Epsilon")), 
"Epsilon", 
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"StatSocial"), 
ISPICKVAL(Opportunity.Data_Partners_EU_Entire_Campaign__c, "StatSocial"),
ISPICKVAL(Direct_Match_Vendor__c,"StatSocial"),
ISPICKVAL(Data_Partners_EU__c, "StatSocial")), 
"StatSocial", 
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Crossix"), 
ISPICKVAL(Direct_Match_Vendor__c,"Crossix")), 
"Crossix",  
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Symphony"), 
ISPICKVAL(Direct_Match_Vendor__c,"Symphony")), 
"Symphony", 
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Urban Science"), 
ISPICKVAL(Direct_Match_Vendor__c,"Urban Science")), 
"Urban Science", 
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"84.51"), 
ISPICKVAL(Direct_Match_Vendor__c,"84.51")),
"84.51",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Acxiom"), 
ISPICKVAL(Direct_Match_Vendor__c,"Acxiom")),
"Acxiom",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Alliant"), 
ISPICKVAL(Direct_Match_Vendor__c,"Alliant")),
"Alliant",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"AMEX Advance"), 
ISPICKVAL(Direct_Match_Vendor__c,"AMEX Advance")),
"AMEX Advance",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Ansa/RSi"), 
ISPICKVAL(Direct_Match_Vendor__c,"Ansa/RSi")),
"Ansa/RSi",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Datalogix"), 
ISPICKVAL(Direct_Match_Vendor__c,"Datalogix")),
"Datalogix",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Dun & Bradstreet"), 
ISPICKVAL(Direct_Match_Vendor__c,"Dun & Bradstreet")),
"Dun & Bradstreet",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"HG Data"), 
ISPICKVAL(Direct_Match_Vendor__c,"HG Data")),
"HG Data",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Infogroup"), 
ISPICKVAL(Direct_Match_Vendor__c,"Infogroup")),
"Infogroup",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Inscape"), 
ISPICKVAL(Direct_Match_Vendor__c,"Inscape")),
"Inscape",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"IRI"), 
ISPICKVAL(Direct_Match_Vendor__c,"IRI")),
"IRI",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Kantar"), 
ISPICKVAL(Direct_Match_Vendor__c,"Kantar")),
"Kantar",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Neustar"), 
ISPICKVAL(Direct_Match_Vendor__c,"Neustar")),
"Neustar",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Oracle (BlueKai)"), 
ISPICKVAL(Direct_Match_Vendor__c,"Oracle (BlueKai)")),
"Oracle (BlueKai)",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"PeopleFinders DaaS"), 
ISPICKVAL(Direct_Match_Vendor__c,"PeopleFinders DaaS")),
"PeopleFinders DaaS",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Transunion"), 
ISPICKVAL(Direct_Match_Vendor__c,"Transunion")),
"Transunion",
IF(or( 
ISPICKVAL(Opportunity.Data_Partners_Entire_Campaign__c,"Nielsen Catalina"), 
ISPICKVAL(Direct_Match_Vendor__c,"Nielsen Catalina")),
"NCS",
null 
))))))))))))))))))))))))))

I have started a case statement below. My question is  how would I condense the above into to one case statement as there are two different picklist values being used one from opportunity and one from opportunity products.
CASE(Data Partners Entire Campaign,
“NCS”, “NCS”,
“Comscore”, “Comscore”,
“Experian”, Experian”
“Argus”, “Argus”,
“Epsilon”, “Epsilon”,
“StatSocial”, “StatSocial”,
“Crossix”, “Crossix”,
“Symphony”, “Symphony”,
“Urban Science”, Urban Science”,
“84.51”, “84.51”,
“Acxiom”, “Acxiom”,
“Alliant”, “Alliant”,
“AMEX Advance”, “AMEX Advance”,
“Ansa/RSi”, “Ansa/RSi”,
“Datalogix”, “Datalogix”,
“Dun & Bradstreet”, “Dun & Bradstreet”,
“HG Data”, “HG Data”,
“Infogroup”, “Infogroup”,
“Inscape”, “Inscape”,
“IRI”, “IRI”,
“Kantar”, “Kantar”,
“Neustar”, “Neustar”,
“Oracle (Blue Kai)”, “Oracle (Blue Kai)”,
“PeopleFinders DAAS”, “PeopleFindersDAAS”,
“Transunion”, “Transunion”,
“Nielsen Catalina”, “NCS”,
“Vizio”, “Inscape”,
“”)

 

We have the following record type for Accounts:

Holding Company
Main Agency
Local Agency
Advertiser

What we need is a validation rule that allows only the System Administrator to EDIT those record types? Hhow do I write this rule?

 

I have started writing the following trigger to update child records based on a checkbox field being updated on the Parent Record:

trigger Agency_in_Collections on Account (after update) {
 
   for (Account Agency: Trigger.new){
        Account oldAgency = Trigger.oldMap.get(Agency.Id);
           if(oldAgency.Agency_in_Collections__c != Agency.Agency_in_Collections__c && Agency.Agency_in_Collections__c == true)
              {
              List<Account> children = [ SELECT Id, AccountID, Agency_in_Collections__c from
                Account where AccountID = :Agency.ID];
                  List<Account> newids = new List <Account>
                  ();
                    for(Account acc: children){
                       if(acc.Agency_in_Collections__c != acc.Agency_in_Collections__c){
                           acc.Agency_in_Collections__c = acc.Agency_in_Collections__c;
                               newids.add(acc);
                               }
                            }
                            if (newids.isEmpty()== false){
                                update newids;
                            }
                     }
          }
 }


The checkbox field on the Parent Record is called "Agency in Collections". The field name on the Child Record is "Agency on Collections". 

I was working on this in sandbox and was getting an error when saving the trigger. The error is: 

User-added image
Please help. If there is a better way as well please let me tknow.
 

Hello,
I need a way to create a field on the opporutnity level that looks at the opportunity team members and counts of there are or are not any team members. I can't do this via a rollup field. I tried a formula field but can't find a way to get to the opportunity team level.

Any suggestions?
Thank you.

Hello,
I wrote a trigger on the task object. What the trigger is supposed to accomplish is looking at a name in a field on the task, then going to a custom object to find that name, and when the name is found pull the email from that custom object onto the task. 
Can you please review my code below and let me know if this will accomplish what I need? Then I will need to deploy it. I know the process for how to deploy the trigger but do I need to create a test case first? And if so what would that test class look like?
____________________________________________________________________________________________________________________
TRIGGER
trigger TaskAccountManagerEmailTrigger on Task (before insert, before update) {

    map<string, string> DM = new map<string, string>();
    Set<String> Person = new Set<String>();
    For(Task t: trigger.new)
    {
        if(t.Account_Manager__c!=null)
        Person.add(t.Account_Manager__c);
    } 
    
    List<Holding_Object__c> HoldingLst = new List<Holding_Object__c>();
    if(Person!=null && Person.size()>0)
    {
       HoldingLst=[select Persons_Name__c, Email_Address__c from Holding_Object__c where Persons_Name__c in: Person];
    }
    
    if(HoldingLst!=null && HoldingLst.size()>0)
    {
        for(Holding_Object__c hd : HoldingLst)
        {
            DM.put(hd.Persons_Name__c, hd.Email_Address__c);
        }
    }
    
    for(Task t: trigger.new)
    {
        if(DM.Containskey(t.Account_Manager__c) && DM.get(t.Account_Manager__c)!=null)
        t.Account_Manager_Email__c = DM.get(t.Account_Manager__c);
    }
    
}
I need to make some changes to some test classes that I didn't create.

Before I make those changes can you let me know the following:
  1. I am assuming I need to make these changes in our sandbox and then deploy to production. Is this correct?
  2. If I make these changes will it disrupt anything we currently have running in production? Or are these strictly used when testing during deployment of things such as triggers?
I need to avoid having any issues arise in the production environment.

I sincerely appreciate the help.