wings Hi After a new record is created I want to send SMS so I created a rule to handle this eg if RequestIssue IS NEW then DISPLAY URL 'https://www.smsglobal.com.au/http-api.php?action=sendsms&user='+SystemSettings.SMSUserName+'&password='+SystemSettings.SMSPassword+'&from='+SystemSettings.SMSFromNumber+'&to='+RequestIssue.Role.RoleMobileNumber+'&text='+RequestIssue.IssuePriority If I use Display URL I get an error as it want to display the page specified. How should I implement this?
tford wings, I would build the URL in a RegularUser attribute & use ... DISPLAY URL LoggedInRegularUser.SmsUrl . Using this method allows you to inspect the URL during testing to see if it's being built properly. To build URLs like this, I store the various static snippets in SystemSettings also. For Example SystemSettings.SmsUrl_1 would hold https://www.smsglobal.com.au/http-api.php?action=sendsms&user= Tom
aware_support If you just want to call the URL and handle its output without displaying anything use the URL_CONTENTS function that reads the specified URL and return the result as string.
Sergej How can it be implemented using this URL method to indicate whether sms message is sent or not?
RLJB Try: SMSMailNotification.Confirm=URL_CONTENTS('http://www.smsglobal.com/http-api.php?action=sendsms&user=XXXX&password=YYYYY&api=1&apireply=1&to=61'+SMSMailNotification.ToNumber+'&maxsplit=5&SenderID=ZZZZZ&text=You%20have%20been%20sent%20a%20message.') The confirmation from SMSGlobal gets written into SMSMailNotification.Confirm - if there is an error you get the error in there too, and you can do with it as you wish.
Sergej Thanks. I am just leraning how to do this. How do you send sms notifications by system using this method? CREATE SMSNotification SMSNotification.Sending= URL_CONTENTS('http://somesms-server.com/sys/send.php?login=mylogin&psw=mypassword&phones=<<Order.Client.Tel>>&mes=my_message') Like this right?