I want to put a custom button on a standard detail page layout to execute Apex code, and I'm wondering if using VF page action attribute is the best practice.
Here are the details. When the user clicks the custom button on the detail page, I need to check a couple field values in the record. If they are valid, I want to insert 8 child records, popup a window saying insert is complete, then return to the original record detail page. If the field values are not valid, then I want to popup a window saying the child records were not inserted, then return to the original record detail page.
So, there's no real user interaction here, just record creation where appropriate and some popup messages.
In the past, I have used a VF page with the action attribute to call a method in the VF controller. The constructor is empty and the VF page also has no content. This worked fine, but I have read some old posts that say using action attribute this way is not best practice.
Is this still true? If so, what's a better approach for this -- webservice methods, or using action function in the VF page? Note: this button is for internal use only, it would not be part of a managed package.