How to display SLA on service portal ( incident)

skkkk
Giga Contributor

I want to publish "planned_end_time" on   service portal incident.

1 ACCEPTED SOLUTION

Gaurav Bajaj
Kilo Sage

HI Hima,



Where do you want to display it in the portal?



Do you need it inline to the incident details on incident form?




Thanks


Gaurav


View solution in original post

12 REPLIES 12

skkkk
Giga Contributor

how can we pass the   dynamic incident number ?


var gr = $sp.getRecord();


data.sys_id = gr.getUniqueValue();



use this in Server side code


Please Make below changes in the widget and you will see the result.



find_real_file.png



Server-side


var breachTime='';


var grSLA= new GlideRecord('task_sla');


grSLA.addQuery('task',gr.getUniqueValue());


grSLA.setLimit(1);


grSLA.query();


while(grSLA.next()){



breachTime=grSLA.getDisplayValue('planned_end_time');




}




data.plannedTime=breachTime;




HTML :




<div class="col-md-6 col-sm-12 col-xs-6 m-b break-word">


                  <label class="m-n">Planned End Time</label>


                      <div>{{data.plannedTime}}</div>


              </div>  







find_real_file.png




Please mark correct/helpful based on the impact of the response.




Thanks


Gaurav


Gaurav,


Issue got fixed . Thanks for your quick help .


Hi Hima,



Please mark the response correct




Thanks


Gaurav