Dynamics AX

Welcome to my Dynamics AX playground!

Home     Articles     Dynamics AX - Trivia     Dynamics AX Search     Mohammed Rasheed     Contact Me     My Dynamics Ax Blog      
Guide to Setup SSRS with
Add Fields to a Table Using Code
Code to view Ledger Transaction Details
AX Mobile - Installation and Configuration
Forecasting in Dynamics AX 2009
Multi Threaded Programming in DAX
OLAP - Installation and Configuration
Send Text Messages (SMS) from DAX
Sending Emails from DAX without Outlook.
Using Data Definition Groups
A View Thing..
All About Maps..
COM Class Wrapper
Create a Role Centre
Create and Post Counting
Outlook 07 Integration
Alerts to Multiple Users
Counting Lines of Code
 
 

Send Text Message (SMS) from Dynamics AX.

view in PDF (with pics... Better Quality)

 

Yes... you read it right....this article is a guide to build an AX-SMS gateway interface.

 

The web services that are used by my code are provided by webSeerviceX.net. One would have to contact them for rights to use the service.

 

The wsdl for the web service can be found at: http://www.webservicex.net/sendsmsworld.asmx?wsdl

 

Currently only the following countries are services by the provider (i.e one can only send text messages to phones in these countries):

 

Austria, Croatia, Germany, Israel, Lithuania, Maldives, Norway, Switzerland, USA, Canada, France, India, Japan, Malaysia, New Zealand, Spain and Ukraine.

Unfortunately UK mobiles are not supported by the web service.

 

Anyways... this is how you can do it... click here to view the terms at which this code is to be used.

My form look like this... very basic...the idea was to make this as extensible as possible.. So others can reuse the code to fit their requirements.

 

 

the core work is done in a class: moTextFromAX  J

 

I am using an XmlHttp com object to communicate with webServiceX..

 

Then the usual stuff ... add parm methods to pass variable through code in an efficient manner..

The above method is used to build the url, that is to be called... for more information on the url, visit the webServiceX website.

 

The next pic shows the code that actually links with webserviceX, sends the message and receives a reply from the web service.. as I said before I am using Microsoft.XMLHttp as the core integration component.

 

Rest is cosmetic work.. i.e. Form design..you are free to use this code directly on the main ax forms (CustTable, SalesTable, etc) ... I wanted to use a popup, which is why I created a new form.

 

I am defaulting 44 as the country code, I would suggest changing this to the county/region your client is based in...... its kinda silly of me to default 44 (UK country Phone code)... when UK is not supported by the web service..

 

The above code show how you can modify the init method to default the customers telephone number..that is if you add the new popup Text from to the customer Form...

In all honesty, I am basically trying to show you how you can streamline the process and default in as many values as possible... so the user won’t have to do the same thing twice.

 

Next comes the clicked method (on the ‘Send’ button).... very straight forward.... set the parm methods and call the sendText method, which in turn calls the build Url method and invokes the xmlHttp object.

and that’s all it take to make this integration work...

(Note: the message wasn’t sent, the service is not available in the UK yet)

 

Thanks for reading this post.