Recently we got chance to work on excel download/upload/open functionality from CRM UI.
In result table view of custom application we have some field of type hyperlink, on click of these hyperlink fields we have to display different data of customers
in excel form. The issue we were facing that the open of excel was working only first time means when we were opening excel on click of hyperlink field it was opening perfectly only for first time but second time none of hyperlink field was working.
Event if we were opening same excel twice , it was not working.
I searched this issue on SCN and find number of incomplete threads on the same , so just sharing a small solution that is working fine to remove this issue.
We are using callback class approach to open excel and using window.open() method in .HTM page to oprn excel URL.
After preparing all data in callback class when we were opening the URL from HTM page with Window.open() , system was considering the every URL as same one. So to remove this one we have to pass unique URL every time on click of any hyperlink field.
so in HTM page we change our final URL as::
<% IF lv_our_URL is not initial. %>
Window.open(“<% lv_our_url %> , <% sy-uzeit %> “);
endif . %>
Above code made URL unique each time and open excel without any issue.
Hope it will Help.