• Prashanth Reddy 138
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 5
    Replies
Can I delete an user from salesforce and what is freeze
I have a trigger that I am trying to comment out but I get an unexpected token error. I know this must be simple but where am I going wrong. 
 
/*trigger ContactTrigger on Contact (before insert, after insert, after update, before update) {
//
//Author       :   Amit SanWariya(Appirio)
//Created Date :   15 Feb' 2016
//Task         :   T-476163
//Description  :   Trigger to update the Geolocation fields on Influencer(Contact) object
//
    if(Trigger.isInsert && Trigger.isBefore){
       if(System.label.Disable_Influencer_Owner_Change == 'false'){
             list<contact> contlist = trigger.new;
             for(contact cont: contlist){
                 cont.InfluencerOwner__c = cont.ownerid;
                 cont.ownerid = System.label.NewOwnerId;
             }
       }
    }
    
    if(Trigger.isUpdate && Trigger.isBefore){
     System.debug('####### Before update cont.influencerOwner__c ');
     
       if(System.label.Disable_Influencer_Owner_Change == 'false'){
             list<contact> oldcontlist = trigger.old;
             list<contact> newcontlist = trigger.new;
             System.debug('####### Before update '+oldcontlist.size());             
             for(contact cont: newcontlist){
                 contact oldContact = Trigger.oldMap.get(cont.Id);
                 /*
                 if (cont.InfluencerOwner__c != null && cont.ownerid != cont.influencerOwner__c) {
                     cont.InfluencerOwner__c = cont.ownerid;
                     cont.ownerid = System.label.NewOwnerId;
                 }*/
                 /* if(cont.influencerOwner__c == null){
                     System.debug('####### cont.influencerOwner__c '+System.label.NewOwnerId);
                     cont.InfluencerOwner__c = cont.ownerid;
                     cont.ownerid = System.label.NewOwnerId;                 
                 }
             }
       }
        
    }
    
    if ( Trigger.isInsert && Trigger.isAfter ) {
        //ContactTriggerHandler.afterInsert( Trigger.new );
    }
    else if ( Trigger.isUpdate && Trigger.isAfter ) {
        //ContactTriggerHandler.afterUpdate( Trigger.new, Trigger.oldMap );
    }
    else if ( Trigger.isUpdate && Trigger.isBefore ) {
        //ContactTriggerHandler.beforeUpdate( Trigger.new, Trigger.oldMap );
    }
    
    if(Trigger.isAfter){
        if(checkRecursive.runOnce())
        {
            System.debug('######## Contact trigger Called ');
            System.debug('########System.Label.Disable_Interface_Flow '+System.Label.Disable_Interface_Flow);            
            if('False' == System.Label.Disable_Interface_Flow){
                 System.debug('######## Called syncCustomer code');
                SendAccountUsingRestApi.syncCustomer();
            }
            if(Trigger.isUpdate){
                if('False' == System.Label.DISABLE_PARDOT_ASSIGNMENT_CALL){
                    CustomPARDOT.assignProspectsByContact(Trigger.new);
                }
            }
         if('false' == System.Label.DISABLE_RELATIONSHIP_OWNER_SHARING){
           InfluencerSharingWithRelationshipOwner.sharewithRelationshipOwner(Trigger.new);
         }
         System.debug('::CONTACT SENT TO PARDOT::');

        }
    }
}*/

 
I need to write a validation rule in a date field that does not let the user fill in with a date less than 2 days from today's date or greater than 20 days from today's date. Anyone can help me with that?