How to display active SCTASK in Service Portal?

Byron Plant
Tera Contributor

Hi good day!

We have a customized widget in our Service Portal (created by previous developer) that shows that active RITM Tickets (sc_req_item table) and active Incidents (incident table) of user (see image below).

Now, I need to add a new ICON that when click, will show all the active SCTASK (sc_task table) of user.

find_real_file.png

1 ACCEPTED SOLUTION

Hi @Byron Plant 

Sure will try to assist here. In order to understand what's happening here is as below:

1) When you click on the icon, the list is getting displayed which I believe is a Data Driven OOB widget being utilized here where in the Instance of the widget the Table and conditions are defined to show wither Requested Item or Incident data.

2) So now in order to build a similar functionality please try the steps below and show results what are you getting here:

Press Control on Keyboard and then Right click on the Icon for Incident or Requested Item and then select the option shown in Red below i.e. "Widget in Editor"

find_real_file.png 

Now once you open the widget can you share the result here for all three component below:

HTML

Client Controller

Server Script

 

So what would be happening here is from this widget they must be passing certain parameter to Data Driven widget and then displaying the result in List format, so need to have a look at the code which you need to share here.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

22 REPLIES 22

Hi @Byron Plant 

Couple of things to note here:

1) Try adding the new option which you want and form a URL similar to the ones defined in line number 43 to 48 on server side code widget.

2) Then try adding similar line as done in line number 65 and 66 on Server side of the widget.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hi @shloke04 apologies as I am really lost now. Can you tell me where to start first?

I need to add a new icon for the SCTask like this picture below:

find_real_file.png

 

I believe the fa fa-shopping-cart hold the icon for REQUEST while the fa fa-ticket holds the icon for INCIDENT but I don't know where it is store or how to find them



Hi @Byron Plant

Let's go step by step else it might create confusion.

For having the icon, follow the line of code written on HTML end as per suggestion below:

1) Try adding the new option which you want and form a URL similar to the ones defined in line number 43 to 48 on server side code widget.

Let me know after this modification if you are able to see a new icon or not and then can assist you with the remaining part of logic to display the list as well.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hi @shloke04 this is what I did

I added this on line 49

var my_task = 'id=my_sctask';


while this one is on line 71-72

cat = {id: 7, label: requestLabel, icon: 'fa fa-shopping-cart',link:req_link,'count':reqCount,page:'my_requests',visible:data.currentPage=='my_tickets'||data.currentPage=='my_requests'||data.currentPage=='my_issues'||data.currentPage=='my_sctask'};
categories.push(cat);


This is what it looks like now, it becomes 3 icon and it replicates the icon and link for REQUEST



 

Hi @shloke04 this is what I did


This is what it looks like now, it becomes 3 icon and it replicates the icon for RITM

find_real_file.png

but if I click the 3rd Icon, it will navigate me to this page

find_real_file.png