Running a SQL Stored Procedure from a GoldMine Automated Process
Sometimes an Automated Process can get you 95% of what you need, especially for processing a newly imported lead . . . and yet sometimes you need just a little more than it can provide.
We can do pretty much anything we want with T-SQL coding, since SQL Server is now a standard feature of GoldMine Premium Edition.
So -- how can you get your SQL code to run from an Automated Process in GoldMine?
- Use a "Run External Application" step in your Automated Process to call a batch file and pass the parameters required:

- In the batch file, use a command-line SQL utility like isql or osql to call your stored procedure:

- (Note that this method leaves a SQL username and password in a plain-text file, which is not very secure.)
- The %1 corresponds with the first parameter passed in the AP's command line parameter field. A second parameter would be %2 and so on. This example passes accountno.
- Make sure the batch file is in a location which can be accessed by whatever GoldMine system will be executing the stored procedure. Somewhere inside the GoldMine installation directory is a good place.
- This approach also assumes that you have the SQL Client Tools installed on the system from which the AP will be executed.
Enjoy! (and be careful, you can hurt yourself with this...). Feel free to comment or ask questions with the comments link.