6/20/2025 12:33:20 AM
|
|
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!
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.
|
|
|
|
How to append values into different fields in a recordset
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 |
|
|
| |
|
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!
|
|
|
|
|
|
|
|