Button Configuration
Adding Buttons to Standard Objects
After installing the package, “Send SMS” and “Send Message” buttons are automatically created for Lead, Contact, Account, and Opportunity objects.
- For Classic: Add the “Send SMS” button to your page layout.
- For Lightning: Add the “Send Message” button to your page layout.
Creating Buttons for Custom Objects
If you wish to create these buttons for other custom objects, follow these steps:
For Classic
- Navigate to your custom object’s
Buttons, Links, and Actions
. - Click on
New Button or Link
. - For the URL, enter
/apex/crm_messaging__SendSMSPage?objectName=Your_Object_Name&id={!Your_Object_Name.Id}
.
- Replace
Your_Object_Name
with the API name of your custom object.
For Lightning
- Navigate to your custom object’s
Buttons, Links, and Actions
. - Click on
New Action
. - Select the Lightning Component named “SendMessage”.
- Set the height to 550px.
Bulk Messaging
By default, a “SendBulkMessage” button is created for Lead, Contact, Account, and Opportunity objects.
For Custom Objects
- Navigate to your custom object’s
Buttons, Links, and Actions
. - Click on
New Button or Link
. - Choose
Execute JavaScript
for the Content Source. - Paste the following code:
var selectedRecords = {!GETRECORDIDS($ObjectType.Your_Object_Name)}; if (selectedRecords.length > 0) { var idsJoined = selectedRecords.join(","); window.location = '/apex/crm_messaging__BulkMessagePage?ids=' + idsJoined; } else { alert("Please select at least one record."); }
- Replace
Your_Object_Name
with the API name of your custom object.
- Replace
- Add this button to the list view by including it in the
List View Button
layout.
Note: Bulk messaging is currently supported in Classic. Support for Lightning will be coming soon.