Skip to main content

Return to TX Community

Liaison

Telemarketing Upgrade

Step 1: Record Your Current Package Version

​Prior to upgrading, you will need to find and record your currently installed version. This will be referenced in Step 3 below. 

  1. Navigate to Setup > Installed Packages
  2. Search for TargetX Telemarketing
  3. Note the version number

Note: if your current version is 2609.0, you are on the most recent package and should proceed to Object Dictionary.

Step 2: Manually add the code changes via a Change Set  

Telemarketing is an unmanaged package, so you must manually add the code changes for the Telemarketing package via a Change Set. You must complete the steps in a sandbox environment before pushing to production via an Outbound Change Set. 

Your starting package version number determines what, if any, additional configuration steps may be required. Please click the link for your initial version number (identified in Step 1 above) from the list below. You will be directed to the first step required for your upgrade and should complete all steps that follow. If you do not see your version number listed, please get in touch with the TargetX Support team. 

Step 3 - Log into your Sandbox 

Ensure that your sandbox has been refreshed before continuing.

Starting Version

This is the version you currently have installed, as Identified in Step 1.

Ending Version

This is the upgrade you are installing, as selected in Step 2.  

Configuration Steps by Release

These are the steps you need to complete, from the starting version to the ending version. For example, if your starting version is 2205.0 (May '22) and you're upgrading to 2208.6 (August '22), you'll need to complete the configuration steps for 2206.3 (June '22), 2207.0 (July '22), and 2208.6 (August '22). 

2505.0 2605.0 (May '26)

Item 1: Update the TelemarketingControllerTest class

  1. Navigate to Setup and search for Apex classes.
  2. Locate and click Edit for the TelemarketingControllerTest apex class.
  3. Replace the contents with the following or download the file here:
    /**
     * This class contains unit tests for validating the behavior of Apex classes
     * and triggers.
     *
     * Unit tests are class methods that verify whether a particular piece
     * of code is working properly. Unit test methods take no arguments,
     * commit no data to the database, and are flagged with the testMethod
     * keyword in the method definition.
     *
     * All test methods in an organization are executed whenever Apex code is deployed
     * to a production organization to confirm correctness, ensure code
     * coverage, and prevent regressions. All Apex classes are
     * required to have at least 75% code coverage in order to be deployed
     * to a production organization. In addition, all triggers must have some code coverage.
     * 
     * The @isTest class annotation indicates this class only contains test
     * methods. Classes defined with the @isTest annotation do not count against
     * the organization size limit for all Apex scripts.
     *
     * See the Apex Language Reference for more information about Testing and Code Coverage.
     */
    @isTest
    private class TelemarketingControllerTest {
    
         static testMethod void testNormalFlow(){
            //campaign
            Campaign testCampaign       = new Campaign();
            testCampaign.name           = 'TestCampaign';
            testCampaign.CallerTimeout__c = 'Null';
            testCampaign.Callbacks__c = '2 Callbacks';
            insert testCampaign;
    
            List<Lead> lstLead = new List<Lead>();
            //Lead
            Lead testLead1          = new Lead();
            testLead1.FirstName     = 'LeadFirstName1';
            testLead1.LastName      = 'LeadLastName1';
            testLead1.Company       = 'Test1';
            testLead1.Street        = '123 abc st';
            lstLead.add(testLead1);
            
            //Lead
            Lead testLead2          = new Lead();
            testLead2.FirstName     = 'LeadFirstName2';
            testLead2.LastName      = 'LeadLastName2';
            testLead2.Company       = 'Test2';
            lstLead.add(testLead2);
            insert lstLead;
    
            List<Contact> lstCon = new List<Contact>();
            //Contact
            Contact testContact         = new Contact();
            testContact.FirstName       = 'ContactFirstName';
            testContact.LastName        ='ContactLastName';
            testContact.Email           = 'Adress2@Adress.com';
            testContact.Title           = 'ContactTitile';
            testContact.MailingStreet   ='456 garrik st';
            lstCon.add(testContact);
    
            //Contact2
            Contact testContact2        = new Contact();
            testContact2.FirstName      = 'ContactFirstName2';
            testContact2.Email          = 'Adress@Adress.com';
            testContact2.LastName       ='ContactLastName2';
            testContact2.Title          = 'ContactTitile2';
            lstCon.add(testContact2);
            insert lstCon;
    
            List<CampaignMember> lstCamp = new List<CampaignMember>();
            //make campaign members
            CampaignMember testCM       = new CampaignMember();
            testCM.leadID               = lstLead[0].Id;
            testCM.campaignID           = testCampaign.Id;
            testCM.Status               ='None';
            lstCamp.add(testCM);
            
            //make campaign members
            CampaignMember testCM1      = new CampaignMember();
            testCM1.leadID              = lstLead[1].Id;
            testCM1.campaignID          = testCampaign.Id;
            testCM1.Status              = 'None';
            testCM1.Failed_Calls__c     = 0;
            lstCamp.add(testCM1);
            
            CampaignMember testCM2      = new CampaignMember();
            testCM2.ContactId           = lstCon[0].Id;
            testCM2.CampaignId          = testCampaign.Id;
            testCM2.Status              = 'None';
            testCM2.Failed_Calls__c     = 0;
            lstCamp.add(testCM2);
            
            CampaignMember testCM3      = new CampaignMember();
            testCM3.ContactId           = lstCon[1].Id;
            testCM3.CampaignId          = testCampaign.Id;
            testCM3.Status              = 'None';
            testCM3.Failed_Calls__c     = 0;
            lstCamp.add(testCM3);
            insert lstCamp;
    
            //begin tests
            TelemarketingController tc1 = new TelemarketingController();
            tc1.ownerId = UserInfo.getUserId();
            List<CampaignMember> testCMList = [ SELECT id, ContactId, CampaignId, Status, Failed_Calls__c FROM CampaignMember WHERE id IN: lstCamp ];
            tc1.updateAll();
            List<CampaignMember> testCMList2 = [ SELECT id, ContactId, CampaignId, Status, Failed_Calls__c FROM CampaignMember WHERE id IN: lstCamp ];
            
            // No changes
            System.assertEquals( testCMList, testCMList2 );
            
            List<Selectoption>sO=tc1.getstatusItems();
            
            tc1.camp = testCampaign.Id;
            String s = tc1.getCampaignName();
            
            //Campaign name
            System.assertEquals( s, 'All Leads' );
            
            tc1.campaignRefresh();
            s = tc1.getCampaignName();
            sO=tc1.getstatusItems();
            
            List<Selectoption> options= new List<Selectoption>{ new Selectoption( 'None', 'None'), new Selectoption( 'No Answer', 'No Answer' ), new Selectoption( 'Left Message', 'Left Message'), new Selectoption('Had Conversation', 'Had Conversation')};
           
            // Options
            System.assertEquals( sO[ 0 ].getLabel(), options[ 0 ].getLabel());
            System.assertEquals( sO[ 1 ].getLabel(), options[ 1 ].getLabel());
            System.assertEquals( sO[ 2 ].getLabel(), options[ 2 ].getLabel());
            System.assertEquals( sO[ 3 ].getLabel(), options[ 3 ].getLabel());
            System.assertEquals( sO[ 0 ].getValue(), options[ 0 ].getValue());
            System.assertEquals( sO[ 1 ].getValue(), options[ 1 ].getValue());
            System.assertEquals( sO[ 2 ].getValue(), options[ 2 ].getValue());
            System.assertEquals( sO[ 3 ].getValue(), options[ 3 ].getValue());
            //Campaign name
            System.assertEquals( s, 'TestCampaign' );
            Test.startTest();
            tc1.getLeadPlusTasks()[0].statusUpdate = 'No Answer';
            System.debug('******' + tc1.getLeadPlusTasks().size());
            tc1.updateAll();
            System.debug('******' + tc1.getLeadPlusTasks().size());
            List<CampaignMember> testCMList3 = [ SELECT id, ContactId, CampaignId, Status, Failed_Calls__c FROM CampaignMember WHERE id IN: lstCamp ];
            tc1.getLeadPlusTasks()[0].statusUpdate = 'Never Answered';
            System.debug('******' + tc1.getLeadPlusTasks().size());
            tc1.updateAll();
            System.debug('******' + tc1.getLeadPlusTasks().size());
           Test.stopTest();
            
           
            
            
            // Changes
            System.assert( testCMList != testCMList3, 'The collections not be equals.' );
            
            sO=tc1.getcampaignItems();
            
            List<Selectoption> auxCampList = new List<Selectoption>(); 
            auxCampList.add(new SelectOption( '1','SELECT' ));
            
            for(Campaign c : [Select Name, Id From Campaign Where Type = 'Telemarketing' AND isactive = true order by Name limit 1])
                auxCampList.add( new SelectOption( c.ID, c.Name ));
                
            Integer k = 0;
            for( SelectOption op: auxCampList )
                System.assertEquals( sO[ k++ ].getValue(), op.getValue(), 'Error list of campaigns must be equals');
        
            tc1.getLeadPlusTasks()[ 0 ].getmemStatusValue();
            tc1.getLeadPlusTasks()[ 0 ].sett( tc1.getLeadPlusTasks()[ 0 ].gett());
            tc1.getLeadPlusTasks()[ 0 ].getmemStatus();
        
        
        
            System.assert( tc1.gethasCampaignID());
            
            tc1.status='None';
            tc1.campaignRefresh();
            System.assert( tc1.status == 'None');
            
            tc1.status='None';
            tc1.campaignRefresh();
            System.assert( tc1.status == 'None');
            
            sO=tc1.getcampaignItems();
            sO=tc1.getstatusItems();
            
            s = tc1.getCampaignName();
            boolean b = tc1.getName();
            
            tc1.setowners(new List<SelectOption>());
            System.assert( tc1.getowners().size() == 0);
            
          }
      
    }
2605.0 2609.0 (September '26)

Item 1: Update the Telemarketing Visualforce Page

  1. Navigate to Setup and search for Visualforce Pages.
  2. Locate the Telemarketing page and click Edit.
  3. Locate the following:
    <apex:selectList value="{!camp}" size="1">Campaign:
  4. Replace it with the following:
    <apex:outputLabel value="Campaign" for="campaignSelect"/>
    <apex:selectList id="campaignSelect" value="{!camp}" size="1">

    TargetX_TlmktgUpgrade_VFTlmktg.png
  5. Locate the following (around line 61):
    <apex:selectList value="{!lpt.statusUpdate}" size="1">
  6. Replace it with the following:
    <apex:selectList value="{!lpt.statusUpdate}" size="1" title="Status">

    TargetX_TlmktgUpgrade_VFTlmktg61.png
  7. Locate the following around line 66:
    <apex:inputTextarea value="{!lpt.t.Description}" cols="25" rows="1" onFocus="this.rows=3;" onBlur="this.rows=1" />
  8. Replace it with the following:
    <apex:inputTextarea value="{!lpt.t.Description}" cols="25" rows="1" title="Notes from Call" html-aria-label="Notes from Call" onFocus="this.rows=3;" onBlur="this.rows=1" />
    TargetX_TlmktgUpgrade_VFTlmktg66.png
    Item 2: Test the Changes in Your Sandbox  
    1. Log in to your sandbox using an existing Telemarketing test user.
    2. Verify they can create a Telemarketing campaign, update a Call Status, etc.
    3. Verify they can access a student from the same test campaign.
    4. Test any additional processes that are important to your institution.
    Item 3: Create an Outbound Change Set 
    1. Navigate to Setup and search for Outbound Change Sets.
    2. Select New.
    3. Name the Change Set, for example, Telemarketing Upgrade September '26.
    4. Add a Description and Save your changes.
    5. In the Change Set Components section, select Add.
    6. Select a Component Type of Visualforce Page or Apex Class, depending on your changes.
    7. Click the checkboxes for the Apex Classes, Visualforce Components, or Visualforce Pages you updated in previous steps, depending on your starting version. For example:
       

      Upgrading from 1912.0

      Apex Class:

      • TelemarketingController

      Upgrading from 2102.0

      Apex Class:

      • TelemarketingController
      • TelemarketingControllerTest
      • TelemarketingSettingsController
      • TelemarketingSettingsControllerTest

      Visualforce pages:

      • Telemarketing
      • TelemarketingSettings

      Upgrading from 2505.0

      Apex Class:

      • TelemarketingControllerTest

      Upgrading from 2605.0

      Visualforce pages:

      • Telemarketing
    Item 4: Upload your Change Set 
    1. From the Change Set, you created above, select the Org to which you want to send the Change Set.
    2. Click Upload.

    Note: Uploading the Change Set will send it to the Target Org; it will NOT make changes in your production Org until you Deploy the Change Set.

    Item 5: Validate the Change Set in your Production Org  
    1. Login to your production Org.
    2. Navigate to Setup and search for Inbound Change Sets.
    3. The Change Set you uploaded should be available under Change Sets Awaiting Deployment.
    4. Click the Change Set you want to deploy.
    5. Click Validate.

    Note: When validating the change set, select Run Specified Tests and enter the following list:
    TelemarketingControllerTest, TelemarketingSettingsControllerTest

    Item 6: Deploy the Change Set in your Production Org  
    1. Login to your production Org.
    2. Navigate to Setup and search for Inbound Change Sets.
    3. The Change Set you uploaded should be available under Change Sets Awaiting Deployment.
    4. Click the Change Set you want to deploy.
    5. Click Deploy. For additional information on deploying Change Sets, please see Salesforce Help & Training article "Deploying a Change Set"
    Item 7: Your upgrade is complete  
    1. See the article: Creating a Telemarketing tab if you wish to create a tab for Telemarketing.
    2. If you wish to create a Lightning App, see the article: Creating the Telemarketing app in Lightning.
    3. No further configuration is required. Proceed to Object Dictionary.

     

    • Was this article helpful?