How to add button in Service portal?

salu
Mega Guru

Hello,

We need to add a button like continue.Earlier we used add it by a macro variables but service portal it won't support.can some suggest an alternate method for it?

And also on click I need a generate a page which shows some information.In normal CMS we did it like UI pages through jelly script.Can someone help me on this.

The below image show what am exactly looking for

Thanks

Saranya

1 ACCEPTED SOLUTION
26 REPLIES 26

Hi Saranya/Hardik,



Can You help me with my requirement. I have a requirement to add some buttons in Incident 'Ticket form' page in Service Portal. "Resolve", "Reopen" and "Close" button so that who has raised the ticket can resolve, reopen or Close the Incident. I was trying to implement that by modifying "Ticket fields" Widget. I have added a button "Resolve" but I don't know how to or where to write the code so that when I click that button, Incident should become 'Resolved' and "Resolved" button is not visible in "resolve" or "Close" states.



Thanks,


Anubhav


Hello Anubhav,


Did you tried to create UI action and call it on server side.It will work in the portal.


Thanks


Saranya


Hi,



Can You tell me or give an example how to do so? These buttons are there for end user without portal but it is not there in portal. Is there any way to call the UI actions in Portal? How to do that?


Hello Anubhav,


I didn't tried this option but you can just check on this two ways.


1. create an UI action and make visible in the ess view.When UI action in server side it will available in the service portal.


2.Create a widget and add button and on ng click fuction you can make the incident resolved.


<button     id="resolve_button"   name="submit" ng-click="resolveincident()"   class="btn btn-primary">Submit</button>



client script


$scope.resolveincident= function (){


  //try here to resolve the incident




  }


<button     id="resolve_button"   name="resolve" ng-click="resolveincident()"   class="btn btn-primary">Resolve Incident</button>



client script


$scope.resolveincident= function (){


alert('test');


          g_form.setValue('state', 'Value of the resolves sate');


  //try here to resolve the incident




  }