Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, June 20, 2025 
 
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: How to append values into different fields in a recordset
CGK
Posts: 34
 
How to append values into different fields in a recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Aug 07 2:32 AM
Hi,

This code is in for row = 2 to usedrowscount The values which are in the right side are taken from excel sheet.
And are assigned to RS record set.
The issue is we are getting total of 216 records which satisfy the condition.
This 216 records each one by one will be assigned to RS.
In the last we have mentioned RS.update
So what happens is it takes the value assigns it to the record set. Later updates it Again checks the second row, like wise it updates the values.
Instead of updating record by record it overwrites all the previous records and inserts the last record.


RS.addnew
RS("Contact First Name").Value = Var3
RS("Contact Middle Name").Value = Var5
RS("Contact Last Name").Value = Var4
RS("Contact Suffix").Value = currentWorkSheet.Cells(row, col_ContactSuffix).Value
RS("Contact Phone").Value = Var7
RS("Contact Type").Value = Var8
RS("Contact SubType").Value = Var9
RS("Contact Category").Value = Var10
RS("Account TIN").Value = Var1
RS("Account ID").Value = Var2
RS("Lead Source").Value = Var11
RS("Contact Default Account Manager").Value = Var12
RS("Contact Account Manager").Value = Var13
RS("Contact SSN").Value = Var6
RS("Contact Address1").Value = currentWorkSheet.Cells(row, col_ContactAddress1).Value
RS("Contact Address2").Value = currentWorkSheet.Cells(row, col_ContactAddress2).Value
RS("Contact Email").Value = currentWorkSheet.Cells(row, col_ContactEmail).Value
RS("Contact City").Value = currentWorkSheet.Cells(row, col_ContactCity).Value
RS("Contact State").Value = currentWorkSheet.Cells(row, col_ContactState).Value
RS("Contact State Zip").Value = currentWorkSheet.Cells(row, col_ContactStateZip).Value
RS("Account Name").Value = currentWorkSheet.Cells(row, col_AccountName).Value
RS("Row Number").Value = row
' RS("Default Acct Manager ID").Value = ""
' RS("Account Manager ID").Value = ""
RS.update
thanks in advance
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: How to append values into different fields in a recordsetYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Aug 07 11:38 AM
What does the complete code look like? Where's the loop?
[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 © 2025 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): 6/20/2025 1:12:21 AM