Refresh ticket list after task menu crmscript has been completed

lock
push_pin
done
Answered
6

Hello! 
I´m working in the new request section and have added a new task menu item that deletes the ticket you right-click on. (This is done by crm-script.)
Is there any way to refresh the list you are currently in by using the script so that the deleted ticket disappears from the list. 




22 Sep 2023 | 08:42 AM

All Replies (6)

Hi Fredrik,

Yes you can refresh the current screen using soprotocol, see the docs

EventData ed = getEventData();
ed.setNavigateTo("soprotocol:main[refresh=true]");
22 Sep 2023 | 08:45 AM
Hi David,
I tried your solution but the ticket is still visible in the list, do i need to use a different approach to refresh the list?
The list refreshes when you for example use the merge function so that was the thing that caught my curiosity if you can delete a ticket with only a task menu script running.
22 Sep 2023 | 08:53 AM

I have now followed the flow by checking which functions that runs and see what the differents is between the endresult of merge and endresult of using soprotocol in a task menu.
The differents is that merge is running https://.superoffice.com/XXXXXX/api/v1/Archive/TicketDynamicSelectionV2 to refresh the table which does not run when you do a soprotocol:main[refresh=true].


Is there a way to run the selection refresh or is this impossible to fix atm? 
I had an idea of running a screen based task menu instead of a crmscript variant but i quickly realised that i can´t find the old url that i need in order to redirect the user back to the ticketlist.(That would have made the page reload instead of refresh.)

 

26 Sep 2023 | 11:33 AM

Sounds more like a bug to me if executing the refresh soprotocol doesn't actually refresh everything in the screen. I don't think you have an other way of refreshing the screen that would refresh the table.

28 Sep 2023 | 08:29 AM

I have done some additional testing and can confirm that this is a bug - related to using selections inside the new service solution. If you execute the CRMscript in the Selection entity, all works as expected.

 

Will report as a bug.

2 Oct 2023 | 01:42 PM

Perfect, then i know. 
Thank you both for your help.

2 Oct 2023 | 02:09 PM

Add reply