We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b60349f commit a9c13f7Copy full SHA for a9c13f7
Server-Side Components/Script Includes/Dynamic Location Validation Approach/UserLocationUtils.js
@@ -0,0 +1,22 @@
1
+var UserLocationUtils = Class.create();
2
+UserLocationUtils.prototype = {
3
+ initialize: function() {
4
+
5
+ },
6
+ getUserLocationCoords: function() {
7
+ var user = gs.getUser();
8
+ var loc = user.getRecord().location;
9
+ if (loc) {
10
+ var locGR = new GlideRecord('cmn_location');
11
+ if (locGR.get(loc))
12
+ return {
13
+ latitude: parseFloat(locGR.latitude),
14
+ longitude: parseFloat(locGR.longitude),
15
+ name: locGR.name.toString()
16
+ };
17
+ }
18
+ return null;
19
20
21
+ type: 'UserLocationUtils'
22
+};
0 commit comments