Service Portal Developement
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2024 06:27 AM
I created HTML Tamplate Like this
<div>
<h1>
Incident Details
</h1>
<p>
You Will get Incident Details
</p>
<table>
<tr>
<th>number</th>
<th>short_description</th>
<th>caller</th>
<th>action</th>
</tr>
<tr ng-repeat="key in data.Inc">
<td>{{key.number}}</td>
<td>{{key.short_description}}</td>
<td>{{key.caller_id}} </td>
<td><button ng-click="c.open(key.sys_id)">Open</button></td>
</tr>
</table>
</div>
I WRITE A CLIENT ID LIKE THIS
api.controller=function() {
var c = this;
c.open = function(id){
alert('Open' +id);
}
};
AND I AM WRITING SERVER SCRIPT LIKE THIS
(function() {
data.Inc=[];
var grInc = new GlideRecord("incident");
grInc.addQuery('caller_id',gs.getUserID());
grInc.query();
while(grInc.next()){
var json ={};
json.number = grInc.number.toString();
json.short_description = grInc.short_description.toString();
json.caller_id = grInc.caller_id.getDisplayValue();
json.sys_id = grInc.getValue('sys_id');
data.Inc.push(json);
}
})();
I AM GETTING THE ANSWER BUT WHEN I AM CLICKING ON OPEN BUTTON AT THAT TIME SYS_ID IS NOT GETTING POPULATED
Incident Details
You Will get Incident Details
number short_description caller actionINC0010187 | 12365 | System Administrator | Open |
INC0010199 | hiiii | System Administrator | Open |
INC0010194 | true I am sagar patil | System Administrator | Open |
INC0010196 | true I am sagar patil. | System Administrator | Open |
INC0010190 | 123 | System Administrator | Open |
0 REPLIES 0