We’ve developed some resources to help you work effectively from home during COVID-19 Click to learn more

Custom screen with data table and iFrame


Is it possible to make a custom screen in CS that uses a datatable to list for example requests and when user clicks on a request an iFrame to the right is populated with another custom screen with data for that request?

Populating a datatable isn't a problem and adding an iFrame using ejScript shouldn't be a problem but I'm struggling to see if I can have the datatable to call a function that populates the iFrame.

An even better solution would be if I could use standard search tickets (or selection of tickets) and have the reading pane display another screen than view ticket. Problem is that sometimes you want the standard screen and sometimes you want the other screen and I see no way to tell the screen chooser what is needed...

Any suggestions?

/ Peter  





RE: Custom screen with data table and iFrame

Hi Peter,

what I think I would do is this. Your screen is divided into two parts. Table on the left, iframe on the right. I'd probably use a Static Table v2 for the table, but I assume you could use DataTable as well.

Each row in the table needs to have a URL that refers back to the SAME screen, but with the iframe-id as part of the URL. And on the right side, where you have your iframe, you dynamically include the ID into the iframe URL to show the correct info.

So each row in your table has a URL somewhat like 

getProgramBlogic() + "&action=doScreenDefinition&includeId=the_same_screen&iframeId=" + rowId;

And during loading of the iframe you use iframeId to show correct info.

This way, you don't need to wiggle any Javascript into the page.

Von: Frode Lillerud 9. Jul 2020

RE: Custom screen with data table and iFrame

Yes, that's possible but I wanted to avoid reloading the entire screen. Reloading the screen will reload the static table as well and that's what I wanted to avoid in order to get a good user experience.

/ Peter

Von: Peter Borg 9. Jul 2020

RE: Custom screen with data table and iFrame

We have done this a couple of times, when clicking a row, just do a restcall to a crmscript that gathers all the data.

Then use bootstrap or semantic to open up an full screen modal with the populated information.

Quick, looks very good and its flexible, and no need to reload anything.

Note, you might need to do a bit of jquery fix, for example, override the a href click and prevent it before the restcall.


Von: Pär Pettersson 2. Aug 2020