add Export List functionality

I have a list that is being shown using a block. The list has a filterscreen created. This all works fine. List displays, filters etc.

I try to add a button to the screen using crm.addButton and I get a javascript response of button added but button is never added to screen. That's problem number one.

Problem number two is even if I get the button to add how to I call the ExportToFile functionality that is built into system screens.

I tried building a .net page that showed the list since I can then build my own button to export BUT then I couldn't provide filtering capability. At least not by trying to add a filterscreen as an entrygroup. That always threw exceptions.

I tried building a.net page that inherited from ListPage. This let the filtering work BUT not in a way that I needed.

So I came back to the build screens, lists, runblocks all in the UI. but now I can't get this custom block to add buttons. Even if I go to a system list that just doesn't have the exporttofile, if I add the button to export to file it and tell the button to call javascript action ExportToFile it just logs me out of the CRM.

Any help or ideas is appreciated.

  • 0

    Bradd

    Could you clarify...

    Are you using ASP pages or .NET pages?

    Are you trying to add the button using JavaScript in the ASP - so server side?

    or

    Are you trying to add the button using JavaScript in the browser - so client side?

  • 0

    Alright so not being able to get the button added is when I use the codeless customization methods. Built a view, a list and search screen. Added search screen to the list filter property. Added the list to a block. Set the block to be shown using runblock on a tab. Then try to add the button using client side api - ex: crm.addButton('Print'); Nothing happens. I can see in chrome console that the javascript response is Button Added..

  • 0

    Bradd

    I am still not entirely clear what you are trying to do. BUT If you are using the Client Side API in 7.2 then I am aware that there are some known issues with controlling buttons. This is because the buttons in ASP pages etc are written out in a different table structure than when they are written out from the dll itself.

  • 0

    Created everything using codeless customization. Created a view in the UI. Created a list in the UI. Created a filter screen for the list in the UI. Created a block to display the list in the UI. Try to add a button to that block/list page that is shown using CRM.addButton and it doesn't work.