/
How to Setup Bulk SMS Functionality on Contact

How to Setup Bulk SMS Functionality on Contact

  • Login to your Salesforce Org where the package is Installed.

  • For Bulk SMS functionality, you have to create :-

  1. Visualforce Page

  2. Controller

  3. Application

 

Change the name of object accordingly . (Example for Lead object, you have to write standardController = “Lead“ instead of standardController = “Contact“)

 

<apex:page standardController="Contact" recordSetVar="cons" extensions="SendBulkSMSActionController"> <apex:includeLightning /> <div id="LightningComponentid" /> <div id="sampleContainer"> <style type="text/css"> .redAlert { font-weight: bold; color: #FF0000; font-size : 22px; text-decoration: none; text-align : center; } </style> <apex:form > <apex:outputPanel id="tstpopup"> <apex:outputPanel rendered="{!showLoading}" > <center> <apex:outputText styleClass="redAlert" value="LOADING..."/><br/> </center> </apex:outputPanel> </apex:outputPanel> <apex:actionFunction name="getLoading" action="{!getLoadingValue}" reRender="tstpopup"></apex:actionFunction> </apex:form> <script> var GetIDs= '{!contactIds}'; var vfRetURLInSFX = '{!JSENCODE($CurrentPage.parameters.vfRetURLInSFX)}'; $Lightning.use("cm_datatransfer:SendBulkSMSApplication", function() { $Lightning.createComponent("cm_datatransfer:sendbulkSMSScreen", { //pass parameter values to lwc js controller listObjectIds : GetIDs listViewURL: vfRetURLInSFX }, "LightningComponentid", function(cmp) { console.log('Insidedd'); getLoading(); console.log('LWC Componenet added in VF page'); }); }); </script> </div> </apex:page>

 

 

/** * Copyright (C) Cloud Maven, Inc - All Rights Reserved * Unauthorized copying of this file, via any medium, distribution and packaging is strictly prohibited * Proprietary and confidential * Written by Cloud Maven <support@cloudmaveninc.com>, December 2019 */ global with sharing class SendBulkSMSActionController { public List<Contact> getIDs; public String contactIds{get;set;} public Boolean showLoading {get;set;} public SendBulkSMSActionController(ApexPages.StandardSetController controller){ System.debug('Get Selected'); showLoading = true; getIDs = controller.getSelected(); contactIds = ''; for(Contact oContact : getIDs){ contactIds += oContact.Id + ','; System.debug('Contact ID : '+contactIds); } contactIds = contactIds.removeEnd(','); //headerdata= ApexPages.currentPage().getHeaders().get('Host'); //urlvalue=Apexpages.currentPage().getUrl(); //url='https://' + headerdata+ urlvalue; } public void getLoadingValue() { System.debug('Inside'); showLoading = false; } }

 

<aura:application access="GLOBAL" extends="ltng:outApp" > <aura:dependency resource="sendbulkSMSScreen"/> </aura:application>

 

  • Now, we have to make button “Send Bulk SMS“.

  • Go to Source Object and then Go to Button,Links, and Actions

  • Click on “New Button or Link“.

  • Enter the details as shown in below snapshot.

  • Select the Visualforce page you have created.

  • Click Save.

  • Now, Go to Search Layouts for Salesforce Classic.

  • Click on Edit of List View Edit.

  • Select Send Bulk SMS button from Available Buttons and add it to Selected Buttons

  • Click Save.

  • You can see Send Bulk SMS button.

 

Related content

How to send Bulk SMS
How to send Bulk SMS
More like this
SMS Post Installation Guide
SMS Post Installation Guide
More like this
SMS Bell Notification Flow
SMS Bell Notification Flow
More like this
How to send SMS/MMS
How to send SMS/MMS
More like this
How to create SMS templates
How to create SMS templates
More like this
eFAX Post Installation Guide
eFAX Post Installation Guide
Read with this