My requirement is --> Whenever the user clicks this custom button, a new record needs to be created in Account as well as Contact objects, based on the data present in custom object.
How do I achieve this and what can be the code skeleton? I do not want to go for Visualforce.
답변 3개
You can do this with Flow instead of code
Trailhead has a challenge of creating an Account and Contact through screen input
https://developer.salesforce.com/trailhead/en/business_process_automation/flow
which you could easily adapt to autolaunch from a button based on examples in the Cloud Flow Designer workbook
https://resources.docs.salesforce.com/sfdc/pdf/workbook_flow.pdf
Straightforward to do