Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hey, guys!
I have to export csv file while exporting if cvs content are failed then it should create dynamically new csv file and only failed content should be reside there.
And same(dynamic csv) file(with failed content) should be download by that user only.
On above i am not able to create dynamic file and how to assign same file to end user.??
I imagine you have a Service that is creating your CSV and then it is Writing that to File.
I would use a File Repository and if you want to be specific to a User, I would set visibility to ensure that.
Use a Try/Catch to find out where you fail and respond appropriately based on that.
Chung you are correct. i am creating new CSV file(file name hardcoded) and writing failed data on that CSV file.
Could you please let me know how to make dynamic newly created CSV file.