Service Portal - Get current Request record and provide link to sc_request page.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2017 02:15 PM
Hello,
Hopefully, this is an easy question. I am still learning JavaScript and have no experience with AngularJS. Anyway, I am trying to create a link using the 'link-button' widget to be directed to the 'sc_request' page of the Service Portal. However, I have no clue how to get or capture the current 'Request' (1) and pass that number into the URL link that will take the user to the sc_request page and populate the page with the corresponding request and requested item(s). This page provides more detail about the request and request item(s) vs. just message communication and overall progress.
Thank you,
-Wesley
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2017 02:31 PM
Hi Wesley,
The Screenshot you shared is the sc_request page. So we are not sure why you want a link to the same page...
Or do you want the link button somewhere else to point to this page?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2017 03:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2017 04:30 PM
Hi Wesley,
I think this is what you could do (I'm no expert though).
- Modify the server script to build the URL in the required format and add a object property (something like record.url2)
- You need to add a ng-click in the HTML at the appropriate place where you need the link.
- Clone the OnClick method in client controller and create OnClick2 method (to take url2 as parameter) and make the required changes (I guess this is the tough part of figuring out)
- Wire it up with HTML something like below:
<a ng-click="onClick2($event, item, item.url, {})" href="javascript:void(0)" >
EDIT: Ofcourse, look at the Sc_request page in the service portal config to get the idea.
EDIt2: You will also need to clone the widgets etc during this process since you cannot modify the out of box ones in place.
Good luck.