• Brooks Johnson 6
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 18
    Replies
I am trying to comment out a couple old triggers that my Org does not use anymore. They are commented out in the Sandbox and set to inactive. I have also commented out the test classes and the trigger handlers in the sandbox. 

But I am not able to deploy because one the triggers and two of the test classes are on an object that no longer exists. I am getting a  failure because my code coverage is only 63%  The tests that are failing are the ones that I want to turn off along with their trigger. How can I deal with this?
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 am trying to build a flow that loops through all Contact Records to find the largest Pardot score. It will then save that score in a variable to use for scoring. My plan was for this to be an auto-launched flow from Process Builder. I am stuck one starting variable to use to have the Flow loop through all contacts. Not just a set belonging to a certain account or owner etc.... 
Hi I am trying to work through the Custom Controller challenge in Trailhead.  My VF page is giving me the error : 
Visualforce Error
Help for this Page
System.QueryException: unexpected token: ORDER 
Class.ContactsListController.getContacts: line 7, column 1

I am not seeing anything wrong with my code.  Any thoughts on where I am going wrong?
apex:page controller="ContactsListController">
    <apex:form >
        <apex:pageBlock title="Contacts List" id="contacts_list">
            <apex:pageBlockTable value="{! contacts}" var="ct">
                <apex:column value="{!ct.FirstName}"/>
                <apex:column value="{! ct.LastName}"/>
                <apex:column value="{! ct.Title}"/>
                <apex:column value="{! ct.Email}"/>                                                  
            
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>   
    
</apex:page>


public class ContactsListController {
    
    private String sortOrder = 'LastName';
    
    public List<Contact> getContacts(){
    
    	LIST<Contact> results = Database.query(
            'SELECT Id, FirstName, LastName, Title, Email' +
            'FROM Contact ' + 
            'ORDER BY ' + sortOrder + ' ASC ' + 
            'LIMIT 10'
        );
        return results;
    
            }
}

 
I need to build a button that links to visual force page so my users can export directly to Excel.  But I am getting errors trying to connect to the related lists. I related list is called "influencers" It is a list on a custom object called Lists. The related list are contacts that are connected via a junction object calls Relationship Owner.  Lists__c , Relationship_Owner__C and Contacts.  On Schema Builder the name of the relationship from Lists to Releionship_Owner is "lists"

If I try to access via <apex:relatedlist/> I get an error that "Contacts is not a valid child relationship name for entity list.  I get the same error if I try to use <apex:relatedlist list ="lists__r>

I have also tried to build a table that connected all three via dot notation and still can get the related list to appear.  Pretty new to Visualforce and Salesforce Development. Any help would be great. 
<apex:page standardController="Lists__c">
    <apex:pageBlock title="Influencers">    
    	<apex:pageBlockTable value="{!Lists.Lists__r.contacts}" var="contacts">        
   	    </apex:pageBlockTable>        
   </apex:pageBlock>
</apex:page>

 
I am trying to comment out a couple old triggers that my Org does not use anymore. They are commented out in the Sandbox and set to inactive. I have also commented out the test classes and the trigger handlers in the sandbox. 

But I am not able to deploy because one the triggers and two of the test classes are on an object that no longer exists. I am getting a  failure because my code coverage is only 63%  The tests that are failing are the ones that I want to turn off along with their trigger. How can I deal with this?
Hi I am trying to work through the Custom Controller challenge in Trailhead.  My VF page is giving me the error : 
Visualforce Error
Help for this Page
System.QueryException: unexpected token: ORDER 
Class.ContactsListController.getContacts: line 7, column 1

I am not seeing anything wrong with my code.  Any thoughts on where I am going wrong?
apex:page controller="ContactsListController">
    <apex:form >
        <apex:pageBlock title="Contacts List" id="contacts_list">
            <apex:pageBlockTable value="{! contacts}" var="ct">
                <apex:column value="{!ct.FirstName}"/>
                <apex:column value="{! ct.LastName}"/>
                <apex:column value="{! ct.Title}"/>
                <apex:column value="{! ct.Email}"/>                                                  
            
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>   
    
</apex:page>


public class ContactsListController {
    
    private String sortOrder = 'LastName';
    
    public List<Contact> getContacts(){
    
    	LIST<Contact> results = Database.query(
            'SELECT Id, FirstName, LastName, Title, Email' +
            'FROM Contact ' + 
            'ORDER BY ' + sortOrder + ' ASC ' + 
            'LIMIT 10'
        );
        return results;
    
            }
}

 
I need to build a button that links to visual force page so my users can export directly to Excel.  But I am getting errors trying to connect to the related lists. I related list is called "influencers" It is a list on a custom object called Lists. The related list are contacts that are connected via a junction object calls Relationship Owner.  Lists__c , Relationship_Owner__C and Contacts.  On Schema Builder the name of the relationship from Lists to Releionship_Owner is "lists"

If I try to access via <apex:relatedlist/> I get an error that "Contacts is not a valid child relationship name for entity list.  I get the same error if I try to use <apex:relatedlist list ="lists__r>

I have also tried to build a table that connected all three via dot notation and still can get the related list to appear.  Pretty new to Visualforce and Salesforce Development. Any help would be great. 
<apex:page standardController="Lists__c">
    <apex:pageBlock title="Influencers">    
    	<apex:pageBlockTable value="{!Lists.Lists__r.contacts}" var="contacts">        
   	    </apex:pageBlockTable>        
   </apex:pageBlock>
</apex:page>

 
Hi
I have tried varios methods for assigning permissions to the email template folder
All USers, 
Assignment by roles (all that have sales and marketing in the title)
creating a public group that have all the profiles with sales and marketing in the name)
I am still getting the following error:
Challenge Not yet complete... here's what's wrong: 
Access is configured incorrectly for the email storage location.
 
Hello,
I tried many times... but receive the same error message : "Challenge Not yet complete... here's what's wrong: 
Formula in custom field 'Account Annual Revenue' is not correct. Check the instructions."
I followed all instructions & get the right results. It's a basic & very simple formula.
Do someone else encounter the same issue ? Any solution ?