aXes Mobile - How to add a button to Email Employee Details

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

Moderator: jeanmichel

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

aXes Mobile - How to add a button to Email Employee Details

Post by jeanmichel » 25 Aug 2014, 18:53

How to add a button to a project to use the mobile device's Email 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 "Email employee details"

Image

5) Click on the "Screens" tab

Please note: This script uses the values of the fields Title, LastName, FirstName, DOB, EmpID, Street, City, State, Country, ZIP, PhoneNB and these names need to be defined in the screens tab of TS2 development environment for the relevant fields.

Change Fields Names to Title, LastName, FirstName, DOB, EmpID, Street, City, State, Country, ZIP, PhoneNB.

Image

6) Edit script

Image

Copy and paste the script hereunder in the edit box.

Code: Select all

if (window.LRSV)
{
var options =
{
text : ( "---------Personal Identification------------\r\n" + 
"Title: " + FIELDS("Title").getValue() + "\r\n" + 
"Surname: " + FIELDS("LastName").getValue() + "\r\n" + 
"First Name: " + FIELDS("FirstName").getValue() + "\r\n" + 
"Date of Birth: " + FIELDS("DOB").getValue() + "\r\n" + 
"---------Address------------\r\n" + 
FIELDS("Street").getValue() + "\r\n" + 
FIELDS("City").getValue() + ", " + 
FIELDS("State").getValue() + ", " + 
FIELDS("Zip").getValue() + ", " + 
FIELDS("Country").getValue() + "\r\n" + 
"Telephone: " + FIELDS("PhoneNB").getValue() + "\r\n" ),
subject : ( "Details of Employee ID " + FIELDS("EmpID").getValue() ),
recipient : "myEmailAddress@myCompany.com"
};
LRSV.sendEmail( 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