You usually face this issue when you are trying to send an SMS from an object(say Lead) with the standard button script for Send SMS(provided by SMS Magic Interact) and the detail page of the Lead object is not able to identify the return URL.


I would request you to create a custom "Send SMS" button, referring the below code snippet and add it to your layout.


Ensure that you make changes to the below highlighted variables as per the object in picture:

  

{!REQUIRESCRIPT("/soap/ajax/14.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/14.0/apex.js")}
var packagePrefix = "smagicinteract__";
var recordType = 'lead';
var idToUpdate = '{!Lead.Id}'
var nameField = 'Name';
var mobileField = 'MobilePhone';
var optOutField = 'smagicinteract__SMSOptOut__c';
var optOutDefaultValue = 'yes';
var smsType = '';
var userId = '{!$User.Id}';
var elementIdVar = '';
var showUserDropDown = false;
var dialogTitle = '';
var queryString = "/apex/Leads_View_Override?id="+idToUpdate ;                                                    
var url = "/apex/"+packagePrefix+"BulkSendSMS?retURL="+queryString+"&nameField=" +nameField +"&phoneField="+ mobileField+"&optOutField="+optOutField+"&optOutDefaultValue="+optOutDefaultVal+"&objectType="+recordType+"&showUserDropDown="+showUserDropDown+"&recordIds="+idToUpdate;
parent.window.location = url;

  


To get the value variable queryString, you can open any one record belonging to that object and copy the appropriate part of its URL, starting from "/apex" till "?id=".  

Once it is added to the layout, use it to send SMS. The hard-coded URL helps us resolve this issue.


Make these changes and then try to reproduce the issue. If it persists, contact the SMS Magic Support team.