Access tickets from other companies in Customer center

Hi,

 

I want to change the customer center page to list not only tickets from within the user's company but also from other companies that are somehow "related".

I thought about making a custom table that defines these relationships and use that as a parameter, but I can't seem to figure out where ListTickets.html fetches tickets from.

 

What would be the best was of doing this and where do I find the code that fetches tickets?

 

Thanks!

RE: Access tickets from other companies in Customer center

Hi Gisle,

you will have to rewrite the entire listTickets.html-functionality as the default one has a lot of restriction functionality implemented.

What I've done in previous cases is using the SearchEngine class and fetch ticket_customers table based on the relations.

 

The ticket_customers table points to both Person and Ticket table as can be seen here: https://community.superoffice.com/documentation/SDK/SO.Database/html/Tables-ticket_customers.htm

Av: Simen Mostuen Iversen 13. sep 2018

RE: Access tickets from other companies in Customer center

Hi Simen,

I'll give that a try.

Now if I pass in a ticketid in listTicket that the user isn't supposed to have access to it will just redirect to noAccess, does this mean I'll have to rewrite listTicket.html as well (and addMessage.html)?
If so, how would I go about passing in the ticketid? It seems to redirect to noAccess whenever I try to add parameters in the url.

Av: Gisle Kvalvik 14. sep 2018

RE: Access tickets from other companies in Customer center

Hi Gisle, 

yes, you'll have to rewrite both listTicket and listTickets and those pages that the sentry checks.

 

I often make the listTicket.html file to post to itself, and create some logic there that will save the message so that I don't have to create a new addMessage.html as well.

Av: Simen Mostuen Iversen 14. sep 2018