Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, May 3, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Generating SLX IDs
Mark
Posts: 4
 
Generating SLX IDsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Nov 14 8:43 AM


Unfortunately I am not a SLX developer, and have very little understanding of VB which doesnt help much either. I have managed to upgrade our customisations in Saleslogix to facilitate an update from 7.2 to 7.5 to 8.0 but I have one application that I am struggling with. All elements appear to work OK as far as I can get but I am unable to get the existing code to generate a SLX ID for a custom table. This always worked before. SLX is running fine from my machine and I have all native clients etc installed.

The original working function I am trying to run is pasted below: Can anyone help me get this working please?

Friend Shared Function CreateEmailCampaignResponse(ByVal strCONTACTID As String, ByVal strCAMPID As String, ByVal strOUTCOME As String) As Boolean

If blTESTING = False Then

Dim strSQL As String
Dim strCAMPCONTACTID As String
'*** USE THE HIDDEN SLX OLEDB COMMAND TO CREATE A NEW ID FOR CAMPAIGNCONTACT
strSQL = "SLX_DBIDS('CAMPAIGNCONTACT', 1)"
SLXCommand.CommandText = strSQL
strCAMPCONTACTID = ""
Try
strCAMPCONTACTID = Convert.ToString(SLXCommand.ExecuteScalar)
Catch
End Try
strSQL = "insert into CAMPAIGNCONTACT (CAMPAIGNCONTACTID, CREATEDATE, MODIFYDATE, CREATEUSER, " & _
"MODIFYUSER, CONTACTID, CAMPAIGNID, AUTOSENDOUTCOME, AUTOSENDOUTCODE, INITIALTARGET) values (" & _
"'" & strCAMPCONTACTID & "', " & _
"GetDate(), " & _
"GetDate(), " & _
"'ADMIN', " & _
"'ADMIN', " & _
"'" & strCONTACTID & "', " & _
"'" & strCAMPID & "', " & _
"'" & Left(strOUTCOME, InStr(strOUTCOME, "|") - 1) & "', " & _
"'" & Right(strOUTCOME, Len(strOUTCOME) - InStr(strOUTCOME, "|")) & "', " & _
"'T')"

SLXCommand.CommandText = strSQL

Try
SLXCommand.ExecuteNonQuery()
Catch ex As Exception
End Try
End If
End Function

As part of testing I created a copy of the table and set the ID to bigint and autoincrement and pointed the INSERT of the SLXID at a TEMP field. Now the import works, however the TEMP Field is blank, this tells me that the old code above is no longer generating the SLX ID and I cant fathom out why.

I would really appreciate any help that you guys may offer.

Many thanks.

Mark

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Generating SLX IDsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Nov 14 9:21 AM

In your code we can't see where the command 'SLXCommand' is declared. For the SLX_DBIDS command to work, it needs to be executed via the SLX provider. Can you confirm that the command's connection string is using the Saleslogix provider? The connection string will have SLXOLEDB in the string if that is the case.

[Reply][Quote]
Mark
Posts: 4
 
Re: Generating SLX IDsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 07 Nov 14 10:42 AM

Hi Ryan,


Thank you for your quick response...


I have searched the code and the connection string appears to use the SLXOLEDB.  I found this in the following part of the code if this is correct.  Thsi was in the form.vb not the global.vb but sure that doesnt matter.


[Global].strDBCONNECTION = "Integrated Security=;User ID=Admin;Data Source='SERVER_NAME'assword='password';Initial Catalog=SalesLogixrovider='SLXOLEDB.1'ersist Security Info=True;Location=;Mode=ReadWrite;Extended Properties='PORT=1706;LOG=ON'"


If I am looking in the wrong spot and/or If needed I can zip up and send you the full VB application, its not very big.


 


I look forward to receiving your thoughts.


 


Mark


 

[Reply][Quote]
Mark
Posts: 4
 
Re: Generating SLX IDsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 13 Nov 14 5:30 AM

Hi Ryan,


Sorry to chase you, but have you had any further thoughts on the above?


Mark

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 5/3/2024 1:27:43 AM