To create a Send SMS button for Ligthining UI you can follow the below steps.


You will need to Create a VIsual Force Page and Remote Site Settings.


  •  Go to setup -> visualforce pages -> CreateBulkView page
  • Open page and click on Preview button.

  • To configure remote site settings, copy the URL mentioned in the ‘end point’ of the error message (highlighted in the image above). This URL will be different for your organization to make sure you copy this URL from your Preview Page.

  • Now go to ‘Setup’ and search for ‘Remote Site Settings’ in Quick Find box

  • Click on New Remote Site and fill in the details:




  • Make sure that you have set the ‘Remote Site Setting’ to active. Click on save and you are good to go.

  • Fill all details required by you

  • Go to created page from setup -> visualforce pages -> <your page>.

  • Click on Edit button.

  • Remove recordSetVar="con" from first line.

  • Find and change below line

Initial :     var IdList = '{!selected}';

After:       var IdList = '[{!$CurrentPage.parameters.id}]';

  1. You need to add one extra attribute as shown in image

            "renderRecipientList" : false

Note: don’t forget to add ‘,’ to previous line.

  • You can give renderRecipientList value as either true or false based on whether you want to show recipient list or hide it respectively.

  • Click on save button.

  • Now create a detail page button using <your page>.

  • Add button to your layout.

NOTE: if you are using this page in classic detail Page then you need to create a URL button.

Enter Url for URL button as :- 

{!URLFOR('/apex/<PageName>', Contact.Id , ['Id'=Contact.Id,'retURL'='/'+Contact.Id])}  

Above example is for Contact if you want to create page for any other object change url as 

{!URLFOR('/apex/<PageName>', <ObjectAPIName>.Id , ['Id'=<ObjectAPIName>.Id,'retURL'='/'+<ObjectAPIName>.Id])}