0

I need to retrieve all the objects related to an account in salesforce and then export them with a button to an excel file with multiple sheets. Is there a way to do this in apex or lwc or whatever?

I've already tried several techniques but the file won't open.

Thanks for your help

UserSB
  • 1

1 Answers1

0

Did you try using Reports to achieve what you needed? You will add all the fields that you need for your objects and then export the report as Excel.

You can check out this video for making Reports with your needed objects.

As for how you can export this, using a Quick Action (button). I'm not 100% about this since I haven't done this myself but I'm pretty sure It can be done. You will use a Screen Flow and then from it:

  1. Call an Apex action to export it that way. OR
  2. Export your report from the flow directly, but I'm not sure if this is possible.
Scribbler
  • 3
  • 4