
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 08:27 AM
Hi everyone,
Do you have any idea how I can open a record from a list in new tab by changing the "data table from instance definition"?
I want to make the same behaviour as "target = _blank" in the HTML, but the widget doesn't use a "<a>" tag, it uses the go method in the scope.
NB: the standard redirect to the form of the record in the same tab.
Thank you.
Solved! Go to Solution.
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2017 02:20 AM
Hi This is the solution when you have something like this :
$scope.go = function(table, item) {
var parms = {};
parms.table = table;
parms.sys_id = item.sys_id;
parms.record = item;
$scope.ignoreLocationChange = true;
for (var x in c.data.list) {
c.data.list[x].selected = false;
}
item.selected = true;
$scope.$emit(eventNames.click, parms);
};
replace $emit by windows.open
$scope.go = function(table, item) {
var parms = {};
parms.table = table;
parms.sys_id = item.sys_id;
parms.record = item;
$scope.ignoreLocationChange = true;
for (var x in c.data.list) {
c.data.list[x].selected = false;
}
item.selected = true;
window.open( "/spdig?id=directig_consult&table="+parms.table+"&sys_id="+ parms.sys_id,"_blank");
};

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-19-2017 02:20 AM
Hi This is the solution when you have something like this :
$scope.go = function(table, item) {
var parms = {};
parms.table = table;
parms.sys_id = item.sys_id;
parms.record = item;
$scope.ignoreLocationChange = true;
for (var x in c.data.list) {
c.data.list[x].selected = false;
}
item.selected = true;
$scope.$emit(eventNames.click, parms);
};
replace $emit by windows.open
$scope.go = function(table, item) {
var parms = {};
parms.table = table;
parms.sys_id = item.sys_id;
parms.record = item;
$scope.ignoreLocationChange = true;
for (var x in c.data.list) {
c.data.list[x].selected = false;
}
item.selected = true;
window.open( "/spdig?id=directig_consult&table="+parms.table+"&sys_id="+ parms.sys_id,"_blank");
};