0

We have 3 objects Parent, Child, GrandChild. We have a button called "Create Records" on the record detail page of Parent object. On click of that button, the requirement is, using the field data in the Parent record create GrandChild and Child records and associate them to Parent object. I was checking on the possible ways to achieve this scenario. Is it possible to use auto-launched/screen flow to create Child and GrandChild records based on Parent record data on click of the button? How do we display the success message(if records creation is successful) or error message(if records creation fails) if we use flow? If not, can we call apex method directly on click of the button passing on the Parent record Id so that we can write the logic to create GrandChild and Child records in apex. Any pointers on the approach please.

1 Answer 1

0

Yes, a Flow can definitely do this. In fact, I'd recommend it if you can get away with it, it's really easy to use. If you want to call Apex, just create a small LWC component that calls the Apex code when you fire the Quick Action. In short, there are many ways to do this, and Flows should be suitable for this purpose.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.