-
ChatterFeed
-
0Best Answers
-
1Likes Received
-
0Likes Given
-
16Questions
-
46Replies
Trying to Write a Process Builder Flow that send an email alert on the initial criteria being met and then an email of that criteria changes
Initial Criteria to be Met to Send Initial Email
Initial Crtieria Above defined
Initial Criteria:
- Stage Name equals Closed Won
- Foot Traffic Reports equals DAP
- Foot Traffic Reports equals DAP2
- Foot Traffic Reports equals DAP3
- Cross-Channel Reports Is Null False
- MTA Reports Is Null False
- TV Reports equals Grace
- TV Reports equals Tune
- Measurement Reports Offered equals Yes
- Record Type Name equals Viant MS
- Last Modified Profile ID equals xxxxx1
- Last Modified Profile ID equals xxxxx2
(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
-
- Rachel Linder 8
- June 29, 2019
- Like
- 0
- Continue reading or reply
Case Statement With Two Variables/Picklist Fields
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”, “”)
-
- Rachel Linder 8
- March 14, 2019
- Like
- 0
- Continue reading or reply
Need a Validation Rule To Allow Only the System Administrator Profile to Edit Specific Account Record Types
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?
-
- Rachel Linder 8
- March 11, 2019
- Like
- 0
- Continue reading or reply
Trigger Deployment is Failing and Don't Know How To Correct
The "TestClass" code is:
@isTest(SeeAllData=true) private class TestClass { static testMethod void myUnitTest() { Profile p = [Select id from Profile where Name ='System Administrator']; Profile EUP = [Select id from Profile where Name ='EU - Standard User w/ Reporting']; user u = [select id, ProfileId, UserRoleId,Name, Team__c, Territory__c, Region__c from User where /*Name =: 'Gavin Barber']; //*/ProfileId =: EUP.Id and isActive = true limit 1]; // user u2 = [select id, ProfileId, UserRoleId,Name, Team__c, Territory__c, Region__c from User where /*Name =: 'Amy Harrington'];//*/ProfileId =: p.Id and isActive = true limit 1]; // /*User u = new User(Alias = 'standt', Email='standarduser@testorg.com', EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US', LocaleSidKey='en_US', ProfileId = p.Id, TimeZoneSidKey='America/Los_Angeles', UserName='standarduser@testorg.com');*/ Date d = System.Today(); DateTime dt = system.now(); date flightstart = date.valueof(dt.addMonths(-3)); date flightend = date.valueof(dt.addMonths(3)); string ThisWeek1 = dt.format('w'); string LastWeek = dt.addDays(-7).format('w'); integer Lastweeki = integer.valueof((string)Lastweek); integer thisweeki = integer.valueof((string)thisweek1); string thisyear = dt.format('yyyy'); string thisMonth = dt.format('MMMM'); string Quarter = ThisMonth == 'January' ? 'Q1' : ThisMonth == 'February' ? 'Q1' : ThisMonth == 'March' ? 'Q1' : ThisMonth == 'April' ? 'Q2': ThisMonth == 'May' ? 'Q2' : ThisMonth == 'June' ? 'Q2' : ThisMonth == 'July' ? 'Q3' : ThisMonth == 'August' ? 'Q3' : ThisMonth == 'September' ? 'Q3' : ThisMonth == 'October' ? 'Q4' : ThisMonth == 'November' ? 'Q4' : ThisMonth == 'December' ? 'Q4' : '' ; list<Quota__c> qtalist = new list<Quota__c>(); Quota__c testqta = new Quota__c (OwnerId = u2.Id, January__c = 100, February__c = 100, March__c = 100, April__c = 100, May__c = 100, June__c = 100, July__c = 100, August__c = 100, September__c = 100, October__c = 100, November__c = 100, December__c = 100, RecordTypeId = '012500000009iOD',Year__c = '2013',Region__c = 'aaa',Office__c = 'aaa',Team__c = 'aaa'); qtalist.add(testqta); Quota__c qta3 = new Quota__c (OwnerId = u2.Id, January__c = 2, February__c = 2, March__c = 2, April__c = 2, May__c = 2, June__c = 2, July__c = 2, August__c = 2, September__c = 2, October__c = 2, November__c = 2, December__c = 2, RecordTypeId = '012500000009iOD',Year__c = '2012',Region__c = 'aaa',Office__c = 'aaa',Team__c = 'aaa'); qtalist.add(qta3); Quota__c qta2 = new Quota__c (name ='default',OwnerId = u2.Id, January__c = 2, February__c = 2, March__c = 2, April__c = 2, May__c = 2, June__c = 2, July__c = 2, August__c = 2, September__c = 2, October__c = 2, November__c = 2, December__c = 2, RecordTypeId = '012500000009iOD',Year__c = '2012',Region__c = 'aaa',Office__c = 'aaa',Team__c = 'aaa'); qtalist.add(qta2); insert qtalist; test.startTest(); list<Account> AdvertiserList = new list<Account>(); id holdingcompanyrt = utils.getRecordTypeId('Account', 'Holding Company'); Account HoldingCompany = new Account(Name = 'Test HoldingCompany', RecordTypeId = holdingcompanyrt, OwnerID = u2.Id); insert HoldingCompany; id mainagencyrt = utils.getRecordTypeId('Account', 'Main Agency'); Account MainAgency = new Account(Name = 'Test Main Agency', RecordTypeId = mainagencyrt,OwnerID = u2.Id,Holding_Company_Name__c = HoldingCompany.Id); insert MainAgency; id LocalAgencyrt = utils.getRecordTypeId('Account','Local Agency'); Account LocalAgency = new Account(Name = 'Test Local Agency', RecordTypeId = LocalAgencyrt, Main_Agency__c = MainAgency.Id, Holding_Company_Name__c = HoldingCompany.Id, SageID__c ='ABC100'); insert LocalAgency; Account LocalAgency2 = new Account(Name = 'Test Local Agency2', Main_Agency__c = MainAgency.Id ,RecordTypeId = LocalAgencyrt, SageID__c ='ABC100'); insert LocalAgency2; id Advertiserrt = utils.getRecordTypeId('Account', 'Advertiser'); Account Advertiser = new Account(Name = 'Test Advertiser', RecordTypeId = Advertiserrt, Local_Agency__c = LocalAgency.Id ); insert Advertiser; Advertiser.BillingState = 'Idaho'; Advertiser.BillingCountry = 'United States'; Advertiser.Create_Sage__c = true; Advertiser.SageID__c = ''; Advertiser.Main_Agency__c = null; update Advertiser; Advertiser.BillingState = ''; update Advertiser; Advertiser.SageID__c ='100ABC'; update Advertiser; test.stopTest(); } static testmethod void testmethod2() { test.startTest(); Opportunity opp = [select id from Opportunity where Name IN('test') and CloseDate >: system.today()-60 and Sales_Stage_High_Level__c =: 'Open' and HasOpportunityLineItem =: true limit 1]; opp.move_all_flight_dates__c = true; opp.ContractStartDate__c = system.Today(); opp.ContractEndDate__c = system.Today()+90; update opp; test.stopTest(); } static testmethod void testmethod5() { test.startTest(); Opportunity opp = [select id from Opportunity where Name IN('test') and Sales_Stage_High_Level__c =: 'Open' and HasOpportunityLineItem =: true limit 1]; opp.StageName = 'Closed Won'; opp.HasSageID__c = false; opp.Exception__c = false; opp.SVP_Email__c = null; update opp; delete opp; test.stopTest(); } static testmethod void testmethod4(){ test.startTest(); Opportunity opp = [select id from Opportunity where Name IN('test') and Sales_Stage_High_Level__c =: 'Open' limit 1]; OpportunityTeamMember ot = new OpportunityTeamMember(UserId = '005500000018PC2', TeamMemberRole='Account Manager',Split__c = 50,Date_Split_Starts__c = system.Today(),Date_Split_Ends__c=system.Today()+30, OpportunityId = opp.Id); insert ot; test.stopTest(); } static testmethod void testmethod6(){ test.startTest(); /* Opportunity opp = [select id from Opportunity where Name IN('test') and Sales_Stage_High_Level__c =: 'Open' and HasOpportunityLineItem =: false limit 1]; Product2 prod = new Product2(name='test product',CanUseRevenueSchedule=True); insert prod; PricebookEntry pbe = new PricebookEntry(UnitPrice=0, UseStandardPrice=true,Product2Id=prod.id, Pricebook2Id = '01s50000000IJr3',IsActive=true); insert pbe; OpportunityLineItem oliUS = new OpportunityLineItem(UnitPrice=0,Quantity=1,PricebookEntryId=pbe.Id ,OpportunityId=opp.id, Placement__c = 'aaa', Flight_Start_Date__c =system.today()-1,Flight_End_Date__c = system.today()+30, Rev_Type__c = 'CPM',Rate__c = 1, insertbudget__c = 600, distribute_evenly__c = true ); insert oliUS;*/ test.stopTest(); } static testmethod void testmethod3(){ PageReference pageref = new Pagereference('apex/Account_Transfer2'); test.setcurrentpage(pageRef); //Instantiate the standard controller Account act = new Account(); ApexPages.StandardController sc = new Apexpages.standardController(act); //Instantiate the extension //Account_Transfer2 ext = new Account_Transfer2(sc); //Do the work //ext.getEmps(); //ext.del(); //ext.onSave(); //ext.AccountWork(); //ext.NextPage(); //ext.Opportunity_Transfer(); } }
-
- Rachel Linder 8
- March 08, 2019
- Like
- 0
- Continue reading or reply
Writing Trigger to Update Child Records based on a field 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:
Please help. If there is a better way as well please let me tknow.
-
- Rachel Linder 8
- November 26, 2018
- Like
- 0
- Continue reading or reply
How create a a form in salesforce that then populates fields on an opportunity?
What is the best way to accomplish this?
-
- Rachel Linder 8
- November 15, 2018
- Like
- 0
- Continue reading or reply
Classic to Lightning - Adding Products to Opportunities - Fields are Missing and Order of Fields is not the same
We are in the process of moving from Classic to Lightning. We are missing some fields on the Lightning Add Products window that are on the Classic Add Products Window, as well as the order is different in Lightning then in Classic. It seems that there is a Visualforce Page that has been created for adding products. In case it is important, upon saving the product(s) after all fields are complete there is a trigger on the backend that will divide the budget up across the flight dates.
CLASSIC - ADD PRODUCTS WINDOW
LIGHTNING ADD PRODUCTS WINDOW
In the lightning add products window you can see that there are fields missing (budget and distribute evenly) and the order of the fields is different then in the Classic Add Products window. Some of the fields in classic are custom fields. We need the lightning window to include all of the same fields as Classic and it would be extremely helpful to have them display in the same order.
I am not a developer and not familiar with Visualforce so I don't know where to start in the troublshooting process. We did run the Lightning Experience Readiness report and it shows to concerns around the visiualforce page. Here are the two issues:
If it is needed and there is a way to attach the Visualforce Markup for the page please let me know how to do that.
Thank you.
-
- Rachel Linder 8
- August 22, 2018
- Like
- 0
- Continue reading or reply
I need a workflow rule that will send an email when someone is added to the opportunity team and when it is not a specific opportunity record type?
-
- Rachel Linder 8
- July 03, 2018
- Like
- 0
- Continue reading or reply
how can i copy the address of an account onto a contRact record
-
- Rachel Linder 8
- May 20, 2018
- Like
- 1
- Continue reading or reply
How can i count the number of opportunity team members
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.
-
- Rachel Linder 8
- April 11, 2018
- Like
- 0
- Continue reading or reply
validation rule to require a value in a picklist field except for system administrator
Any help. This is what i have started but I think I am way off.
AND( ISPICKVAL(Programmatic_Account_Strategist_PAS__c, " "),
$Profile.Name <> "System Administrator")
-
- Rachel Linder 8
- April 10, 2018
- Like
- 0
- Continue reading or reply
Created a Trigger for a Task - can you please review
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);
}
}
-
- Rachel Linder 8
- October 13, 2017
- Like
- 0
- Continue reading or reply
Will Changing a Test Class in Production affect Production Environment (cause errors)
Before I make those changes can you let me know the following:
- I am assuming I need to make these changes in our sandbox and then deploy to production. Is this correct?
- 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 sincerely appreciate the help.
-
- Rachel Linder 8
- October 06, 2017
- Like
- 0
- Continue reading or reply
My Trigger Failed Deployment - errors with two test classes
TRIGGER CODE
trigger Opportunity_Adelphic_AE_Email_Trigger on Opportunity (before insert, before update) {
map<string, string> DM = new map<string, string>();
Set<String> Person = new Set<String>();
For(Opportunity opp : trigger.new)
{
if(opp.Adelphic_AE__c!=null)
Person.add(opp.Adelphic_AE__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(opportunity opp : trigger.new)
{
if(DM.Containskey(opp.Adelphic_AE__c) && DM.get(opp.Adelphic_AE__c)!=null)
opp.Adelphic_AE_Email__c = DM.get(opp.Adelphic_AE__c);
}
}
MassLeadConverterControllerTest Test Class Error:
Error Message: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, There's a problem with this country, even though it may appear correct. Please select a country/territory from the list of valid countries.: [BillingCountry]
Stack Trace: Class.MassLeadConverterControllerTest.massLeadTest: line 11, column 1
test_updatecontactrolecount Test Class Error:
Error Message: System.Exception: Assertion Failed
Stack Trace: Class.test_updatecontactrolecount.testcreateopptywithconditionandrole: line 38, column 1
-
- Rachel Linder 8
- October 04, 2017
- Like
- 0
- Continue reading or reply
Trigger Deployment Errors
-
- Rachel Linder 8
- August 08, 2017
- Like
- 0
- Continue reading or reply
Writing My First Trigger and Getting an Error
- Opportunity (Standard Object)
- Holding Object (Custom Object)
A name is chosen from a picklist field on the opportunity. Upon save the trigger should go look at the Holding Object object and find that name and pull the email address from that Persons record on the custom object.
Here is screenshot of what I have so far including the error.
The actual code is below (in case the above is hard to read):
trigger Opportunity_Adelphic_AE_Email_Trigger on Opportunity (after update, before insert, before update, before delete) {
Opportunity [] opp = trigger.new;
//Fill in the Adelphic AE email fields based on the person selected from the drop down list.
for(integer i=0;i <opp.size();i++){
Set<string> Person = new Set<string>();
Person.add(trigger.new[i]. Adelphic_AE__c);
if(Person.Size() > 0){
map<string, string> DM = new map<string, string>();
Holding_Object__c [] DMM = [select Persons_Name__c, Email_Address__c from Holding_Object __c where Persons_Name__c in: Person ];
for(Holding_Object__c lzip: DMM){
DM.put(lzip.Persons_Name__c, lzip.Email_Address__c);
}
for(Holding_Object__c h: DMM){
trigger.new[i]. Adelphic_AE_Email__c = DM.get(trigger.new[i]. Adelphic_AE__c);
}
}
The error I am receiving is: "Compile Error: unexpected syntax: 'mismatched input '<EOF>' expecting RCURLY' at line 20 column 1.
Any feedback and guidance would be appreciated.
-
- Rachel Linder 8
- August 02, 2017
- Like
- 0
- Continue reading or reply
how can i copy the address of an account onto a contRact record
-
- Rachel Linder 8
- May 20, 2018
- Like
- 1
- Continue reading or reply
Trying to Write a Process Builder Flow that send an email alert on the initial criteria being met and then an email of that criteria changes
Initial Criteria to be Met to Send Initial Email
Initial Crtieria Above defined
Initial Criteria:
- Stage Name equals Closed Won
- Foot Traffic Reports equals DAP
- Foot Traffic Reports equals DAP2
- Foot Traffic Reports equals DAP3
- Cross-Channel Reports Is Null False
- MTA Reports Is Null False
- TV Reports equals Grace
- TV Reports equals Tune
- Measurement Reports Offered equals Yes
- Record Type Name equals Viant MS
- Last Modified Profile ID equals xxxxx1
- Last Modified Profile ID equals xxxxx2
(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
- Rachel Linder 8
- June 29, 2019
- Like
- 0
- Continue reading or reply
Case Statement With Two Variables/Picklist Fields
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”, “”)
- Rachel Linder 8
- March 14, 2019
- Like
- 0
- Continue reading or reply
Need a Validation Rule To Allow Only the System Administrator Profile to Edit Specific Account Record Types
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?
- Rachel Linder 8
- March 11, 2019
- Like
- 0
- Continue reading or reply
Writing Trigger to Update Child Records based on a field 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:
Please help. If there is a better way as well please let me tknow.
- Rachel Linder 8
- November 26, 2018
- Like
- 0
- Continue reading or reply
How can i count the number of opportunity team members
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.
- Rachel Linder 8
- April 11, 2018
- Like
- 0
- Continue reading or reply
Created a Trigger for a Task - can you please review
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);
}
}
- Rachel Linder 8
- October 13, 2017
- Like
- 0
- Continue reading or reply
Will Changing a Test Class in Production affect Production Environment (cause errors)
Before I make those changes can you let me know the following:
- I am assuming I need to make these changes in our sandbox and then deploy to production. Is this correct?
- 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 sincerely appreciate the help.
- Rachel Linder 8
- October 06, 2017
- Like
- 0
- Continue reading or reply