2

we have a requirement to be able to send sms message via sharepoint online (office 365 ) and we are subscribe with provider this service : https://www.mobily.ws/en/ and they give us web service link with office 365 : http://www.mobilywebservices.com/SMSWebService/SMSIntegration.asmx

i created html page in sharepoint designer for sending sms , what i need is the code for send button . i am beginer with sharepoint , and i don't know how to use web service
Hope to help us Thanks in advance

2

This requires some medium-advanced knowledge and understanding of JavaScript.

In summary, you need to do the following (this is of course 1 of 1k different approaches):

  • Add a HTML button, give a unique ID which you will reference later. Let's call this "sendSMSButton"
  • Add JavaScript (add a JS file to your assets library, then link it on the page from a content editor web part) file, which you will use to make the call.
  • Add a framework (e.g. jquery) to simplify Ajax requests and event handling.
  • Add an event to the button, using the following (assuming JQuery):

$(document).ready(function () { $("#sendSMSButton").click(function () { // Put your custom API javascript here. This is called when the button is clicked.
}); });

  • The web service site appears to provide some JavaScript API samples you can use to get going.

Alternatively, you could create a SharePoint workflow using SharePoint designer, and call the web service inside the workflow. This could be triggered by a list item added, such as a "Notify User" list.

  • Clarification: This answer is to get you started and more importantly heading in the right direction. It is not intended to be a comprehensive solution. – Russell Aug 30 '16 at 8:58
  • Thanks Russell , I prefer to create sharepoint workflow , and run when user add an item , i can use call http action and i used it with json for retrieving items of list and save the result in dictionary ,,, but how can i use call http with this service . – taher mohammad Aug 30 '16 at 9:08
  • You need to find a REST web service endpoint from your provider (they will probably have one), then use the "Call HTTP Web Service" action in your workflow. There is detailed documentation for this over at MSDN: msdn.microsoft.com/en-us/library/office/dn567558.aspx – Russell Aug 30 '16 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.