Most of the SalesLogix systems I see now days no longer use remote users. Instead, all users VPN into a central network to access SalesLogix, or use the SalesLogix Web and Mobile clients instead for remote users. This removes the need to worry about things like synchronization for remote users and also allows you to do some SalesLogix table manipulation without going through the SalesLogix OLE DB Provider since things no longer have to be “sync aware”. This post will provide you with a SQL Stored Procedure to create SalesLogix table ID values from inside of SQL scripts. Keep in mind, you should only use this if you do not have remote users that synchronize with the host system.
WARNING: This is not an officially supported method. Customer FX does not take any responsibility for any damage caused to data by using this approach. This is to be used with caution. This does not use the
SalesLogix OLE DB Provider. Do NOT use this method if you have remote users that synchronize their SalesLogix database with the host system. That said, we’re using this method in several production environments with nothing but success.
Using the Stored Procedure to Create SalesLogix Table ID Values
This stored procedure creates a new SalesLogix ID value for the table specified in the @Table parameter.
To use, declare an variable to use as the output parameter. This output parameter will contain the new ID value.
-- delcare variable for new ID declare @NewKey varchar(12) -- execute stored procedure exec sysdba.GetNewKey @NewKey output, 'ACCOUNT' -- or to include a specific or custom sitecode (such as 1234) exec sysdba.GetNewKey @NewKey output, 'ACCOUNT', '1234' -- use new ID value select @NewKey
Download the Stored Procedure
Now all you need is the stored procedure. Click the link below to download the code and then execute the script in your SalesLogix SQL database as the sysdba user to create the stored procedure.