a!columnsLayout( columns: { a!columnLayout( contents: { if( isnull(local!exportDocId), /*This link field contains the link that starts the export*/ a!richTextDisplayField( labelPosition: "COLLAPSED", value: {a!richTextIcon( icon: "file-excel-o", color: "#6aa84f", size: "MEDIUM" )," ", a!richTextItem( text:"Export Customer Report to File", link:a!dynamicLink( label: "Export to Excel File", saveInto: { a!exportDataStoreEntityToExcel( entity: cons!FS_ORDER_ENTITY_POINTER, documentName: "Excel Export " & now(), saveInFolder: cons!FS_constant, onSuccess: a!save( local!exportDocId, fv!newDocument ), /*This displays an error if there is an issue executing the the save*/ onError: a!save( local!errorMessage, "Error Exporting File to Excel" ) ) } ), size: "STANDARD" )
} ), {} ), a!linkField( labelPosition: "COLLAPSED", links: a!dynamicLink( label: "<<<Back", value: null, saveInto: local!exportDocId, showWhen:not(isnull(local!exportDocId)) ) ), if( /*This only displays the download link if a valid document was created*/ not(isnull(local!exportDocId)), /*This changes the link to a download link for the newly created document */ a!richTextDisplayField( labelPosition: "COLLAPSED", value: { a!richTextIcon( icon: "download", size: "MEDIUM" )," ", a!richTextItem( text: "Download Customer Report", link:a!documentDownloadLink( label: "Download Excel File", document: local!exportDocId ), size: "STANDARD", style: "STRONG" )
} ), a!textField( value: local!errorMessage, readOnly: true ) ) } ), } )
This is the code am working with for this i want to pass filters so that what ever selecting data it has to show in the export to excel sheet to dwlg. Thanks in advance
Discussion posts and replies are publicly visible
HI, You can use "filters" parameter in this smart service. You can use either logical expression or list of queryFliters. Something like below
a!exportDataStoreEntityToExcel( entity: cons!FS_ORDER_ENTITY_POINTER, documentName: "Excel Export " & now(), saveInFolder: cons!FS_constant, filters:{ a!queryFilter() } onSuccess: a!save( local!exportDocId, fv!newDocument )