aXes Mobile - How to add a button to send a SMS

This forum is managed by LANSA and contains documentation update and video tutorials

Moderator: jeanmichel

Post Reply
User avatar
jeanmichel
Posts: 109
Joined: 23 May 2014, 11:37
Location: Sydney

aXes Mobile - How to add a button to send a SMS

Post by jeanmichel » 25 Aug 2014, 18:57

How to add a button to a project to use the mobile device's SMS feature

1) Open aXes development environment

Image

2) Load your project in TS2 and navigate to the screen you wish to customise

Click on "Work as a TS2 Developer"

Image

Signon to your session

Image

Type on the command line: "addlible axesdemo" followed by enter

Image

Type on the command line: "call xhrrpgtrn" followed by enter

Image

Put an X next to to an employee

Image

If you don't have a screen definition, press suggest and save the screen.

Image

3) Add a PushButton

Image

4) Edit caption. Change the caption value to "SMS employee"

Image

5) Click on the "Screens" tab

Please note: This script uses the values of the fields FirstName, PhoneNB and these names need to be defined in the screens tab of TS2 development environment for the relevant fields.

Change Fields Names to FirstName, PhoneNB.

Image

6) Edit script

Image

Copy and paste the script hereunder in the edit box.

Code: Select all

if (window.LRSV)
{
var options =
{
messageText : ( "Please fill timesheet, " + FIELDS("FirstName").getValue() ),
recipient : FIELDS("PhoneNB").getValue()
};
LRSV.sendTextMessage( options );
}
7) You should now have a button on your screen which looks like this:

Image

8) open aXes mobile and run your demonstration

Image Image Image
Regards,

Jean-Michel Rapin

LANSA Pty Ltd
email: JeanMichel.Rapin@lansa.com.au
Address: 122 Arthur Street, North Sydney, NSW 2060, Australia
Tel: +61 289 070 262 http://www.lansa.com | http://blog.lansa.com |

Post Reply