- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2021 09:59 PM
Hi,
I have record producer to show in mobile. In that there is a field to show an URL on my record producer. This field will have dynamic value based on some user inputs. Variable type URL is not working in mobile but working in sp.
So another alternative, is to create a button beside this URL field. I don't have much knowledge in widget creation. Please help me to create a button type widget to open the URL in a browser .
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2021 10:52 PM
Make sure your url is constructed properly
function($scope,$window) {
var c = this;
c.uiAction = function() {
var url = $scope.page.g_form.getValue("url");
$window.location.href = url;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2021 10:07 PM
is it working? Can you share your widget xml
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2021 10:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2021 10:29 PM
$scope is missing from declaration
function($scope) {
var c = this;
c.uiAction = function() {
alert($scope.page.g_form.getValue("url"));
// c.data.action = action;
// c.server.update().then(function() {
// c.data.action = undefined;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2021 10:35 PM
Hi
the alert message is showing properly the URL field value. But after removing the alert, it is not navigating to the URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2021 10:38 PM
You can use this function for redirection,
$window.location.href = hosturl;