Service Portal Developement

sagar patil2312
Tera Contributor

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 action
INC001018712365System AdministratorOpen
INC0010199hiiiiSystem AdministratorOpen
INC0010194true I am sagar patilSystem AdministratorOpen
INC0010196true I am sagar patil.System AdministratorOpen
INC0010190123System AdministratorOpen

 

0 REPLIES 0