
When a user runs a report in Infor CRM (Saleslogix), they are given choices to export the report to certain formats. This can easily be changed if you’d like to limit the choices to only certain types.
Normally, the user will see the following choices:
Let’s say you only want to have the PDF and Word choices available to users. You can easily modify this with the following Javascript:
require(['dojo/_base/lang', 'Sage/Reporting/Enumerations', 'Sage/MainView/ReportMgr/ReportManagerUtility'], function(lang, Enumerations, ReportManagerUtility) { lang.mixin(ReportManagerUtility, { getOutputFormats: function (reportType) { switch (reportType) { case Enumerations.ReportTypes.CrystalReport: return [ { outputFormat: Enumerations.ReportExportFormat.Pdf, caption: Enumerations.nlsResources.txtPdf }, { outputFormat: Enumerations.ReportExportFormat.Word, caption: Enumerations.nlsResources.txtWord } ]; default: console.error('Unsupported report type: ' + reportType); return []; } } }); });
This will result in the following:
Basically, all we are doing in this code is overriding the out of the box function that returns the available export formats. We replace that code with our own that only returns the limited choices.
There are a few options for adding this code. First of all, you can do this very easily using our Custom Loader Module. All you need to do is install the bundle for the Custom Loader Module, then in the SlxClient SupportFiles in AA, simply go to the Custom folder, then Modules, and create a sub-folder named “Reports”. Then add the code above as a file named “main.js” in that folder and you’re done. Otherwise, if you’re not using the Custom Loader Module, you can edit the core.master (under the SlxClient SupportFiles\Masters folder), scroll to the bottom and create a new <script> block before for end </body> tag and paste that code into the <script> block.
Subscribe To Our Newsletter
Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!
You have Successfully Subscribed!