on 03-05-2015 5:02 AM
Hi All,
I am want to fetch current latitude and longitude using GPS. Can i add the javascript in side the rule and map it to a button. I want to capture the lat long values and update it to the back end CRM. Please tell me how to acheive this.
Thanks,
Divya
Divya,
I don't think you need to use javascript to accomplish this. Agentry provides native rule terms for retrieving the GPS_LOCATION and in turn getting the LATITUDE and LONGITUDE. This of course assumes the device has GPS hardware.
In terms of updating the backend, you can create an action (executed from a button) that runs a transaction to capture the current lat, long that will then update the backend using the Transaction update steps.
--Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Thanks for the reply. I had posted this thread for accessing device current location.
scn.sap.com/message/15779664#15779664
I referred this thread for doing this.
I did the same steps mentioned in the above thread. But When i run the SAPCRMSM App, and click the "Map" button, i get an error
"The transaction validation failed. Cannot back into an Action Step %1".
Please help in resolving this error.
Thanks,
Divya
Hi Divya,
Refer following steps to get current Latitude and Longitude and send it to backend
1)Create a property of type Location in object that you are sending to backend.
2)Create a transaction for this object Edit/Add according to your requirements.
(Here location is of type Location and refer to Location property from Flight object)
3)For this Location property in transaction add Rule-Before Data entry/rule after data entry according to your requirement.(I have added Rule before data entry)
That rule will look like below....
4) Refer/add this property on screen for that transaction (optional depending upon your requirement).
5) Create an action which will initiate this transaction.Action steps as below
6) Create a java steplet class (and further stephandler and bapi).And access this property as shown below.
(Its up to you where you want to access these properties.I have accessed them in steplet itself.You can access them in bapi setParameters() method or anywhere appropriate.)
7)If all steps configured correctly it will work as shown below
Enabling GPS
Add New Flight
Will look like this on Screen
😎 When you will transmit it.It printed as below on my console
Latitude is :51.507351
Longitude is :-0.1277
Hope this helps.....
Regards,
AK
Hi AK K,
Thanks for the response. I tried the same in Agentry Client and in IPAD. In IPAD i enabled the Location Services.
I created a property called as "ZLocation" of type "Location".
ZLocation Rule - i created with GPS_Location.
I tried printing the values of "transaction.ZLocation.Latitude" and "transaction.ZLocation.Longitude". But both is returning null.
I tried in IPAD. But output is "null". I am working on CRMSM 4.1 with Agentry Client -
Can i test (CRMSM 4.1) GPS feature on this version of Agentry Client? What other configuration i am missing?
Please do help me in resolving this issue.
Thanks,
Divya
Hi Divya,
from screensnap for "Agentry Client" i think you are using WPF client.
So this may not be possible to test because you can not simulate GPS for this.
Instead you can use "Agentry ATE Client" for this where you can have GPS simulation enabled for this.
ATE Client whith GPS simulation enabled:
Or other option is to try with device which has GPS hardware in it...
Regards,
AK
Hi AK K,
How Can i bring it on ATE. I tried deploying my SAPCRMSM 4.1 Application on ATE. Only Calendar Screen is coming. I am not able to go to the service order item screen. Is it Compatibility Issue. I am using SMP Server 3.0 SP 04.
Which Version of ATE will be compatible with CRMSM4.1.
Thanks,
Divya
Divya,
Please download and install the latest SMP3 SDK (SP07 PL01 at the time of this post) and install the updated Agentry Editor component. The Editor now includes a built in Agentry Test Environment to replace the standalone version. It is based on the WPF client and does a much better job at handling the iPad screens and newer controls.
The ATE in the Editor can view objects, CT/DT, transactions. Debug Actions, Rules, Transactions just like the standalone version.
--Bill
Hi Stephen,
The IPAD OS Version is 7. But still location details it is not showing. What else could be the error.
I have followed the document "Agentry Fetch Device Location". Then i get the error - "Transaction Validation Failed. If i try to print the values as said above - "Value is null".
Mean while I will also try to download this SDK ( SMP3 SDK (SP07 PL01)).
Please do help to get the location details in my IPAD.
Thanks,
Divya
Hi Bill,
As you said, I have installed SMP3 SDK (SP07 PL01). Now i can debug my objects and Transactions. Here how do i pass latitude and longitude values. i mean enable GPS simulation.
In debug it calls ResetGPS and QueryGPS Transaction. But everything is 0. I cannot see any values.
Please do help.
Thanks,
Divya
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.