• Salesforce5566
  • NEWBIE
  • 20 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 1
    Replies
AND(
  NOT(ISBLANK([Contact].Primary_Campaign_Source__c )) ,
  OR(
         ISNEW(), ISCHANGED([Contact].Primary_Campaign_Source__c)
   )
)
Hi Facing while retrive the packge... through ANT

 Failed to login: Failed to send request to https://login.salesforce.com/services/Soap/u/47.0

please help me...
AND(ISPICKVAL(Permission_Picklist__c , 'Yes'), ISBLANK( Date_Time__c ))
Please help on this ?
 
rigger SameEmailOnAllContacts on Account (after update) {
    Set<Id> setAccountId = new Set<Id>();
    for(Account acc:trigger.new) 
    {
        if(Trigger.oldMap.get(acc.ID).Email__c != acc.Email__c || Trigger.oldMap.get(acc.ID).phone != acc.phone) {
            setAccountId.add(acc.id);
        }
    }
    List<Contact> lstContact = new List<Contact>();
    
    for(Account acc:[Select id,Email__c,(select id,Email from Contacts) from Account where Id in:setAccountId])
    {
        for(Contact con:acc.contacts)
        {  
            if(con.Email != acc.Email__c) 
            {
                con.Email = acc.Email__c;
                lstContact.add(con);
            }
        }
    }
    if(lstContact.size() >0) {
        update lstContact;
    }
}

Please help me on this !!!!

 
@isTest
public class SameEmailOnAllContactsTest{
 public static testMethod void Test()
 {
 
 Account acct=new Account();
        acct.name='a';
        acct.industry='Electronics';   
        insert acct;
        
         Contact ct = new Contact();
         
         ct.LastName ='Hoal';
         
          insert ct;
 
 }
 }

 
rigger SameEmailOnAllContacts on Account (after update) {
    Set<Id> setAccountId = new Set<Id>();
    for(Account acc:trigger.new) 
    {
        if(Trigger.oldMap.get(acc.ID).Email__c != acc.Email__c || Trigger.oldMap.get(acc.ID).phone != acc.phone) {
            setAccountId.add(acc.id);
        }
    }
    List<Contact> lstContact = new List<Contact>();
    
    for(Account acc:[Select id,Email__c,(select id,Email from Contacts) from Account where Id in:setAccountId])
    {
        for(Contact con:acc.contacts)
        {  
            if(con.Email != acc.Email__c) 
            {
                con.Email = acc.Email__c;
                lstContact.add(con);
            }
        }
    }
    if(lstContact.size() >0) {
        update lstContact;
    }
}

Please help me on this !!!!

 
@isTest
public class SameEmailOnAllContactsTest{
 public static testMethod void Test()
 {
 
 Account acct=new Account();
        acct.name='a';
        acct.industry='Electronics';   
        insert acct;
        
         Contact ct = new Contact();
         
         ct.LastName ='Hoal';
         
          insert ct;
 
 }
 }