Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Monday, April 29, 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!
 External Development Forums - SalesLogix OLEDB Provider
Forum to discuss using the SalesLogix OLE DB Provider from external applications (including usage of built-in provider procedures). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix OLEDB Provider | New ThreadView:  Search:  
 Author  Thread: Inserting into the CONTACT_LEADSOURCE table
Scott Hill
Posts: 5
 
Inserting into the CONTACT_LEADSOURCE tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Jun 06 10:57 AM

naloxone and naltrexone are examples of

morphine with naltrexone and naloxone celticcodingsolutions.com
fiogf49gjkf0d
Hi,

I am trying to insert records into the CONTACT_LEADSOURCE table. I am finding that the insert works properly when I insert a unique combination of LeadSourceID and ContactID, but if I try to insert a record with a LeadSourceID and ContactID that already exist in the table, my call crashes.

From this, I'm gathering that you must have a unique combination of LeadSourceID and ContactID in the table. If this is so, how woud I go about updating a LeadSource record if there is no primary key on the table? Do I have to run an update with two parameters in my WHERE clause? If a contact has a lead source from last week, and then triggers the same lead source this week, I would like to be able to see the most recent lead source in my related list.

Thank you,
Scott
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Inserting into the CONTACT_LEADSOURCE tableYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 15 Jun 06 12:09 PM
fiogf49gjkf0d
Quote:
Originally posted by Scott Hill

I'm gathering that you must have a unique combination of LeadSourceID and ContactID in the table.


That is correct. If you look at the schema for this table you'll see:

CREATE TABLE [sysdba].[CONTACT_LEADSOURCE](
[CONTACTID] [STANDARDID] NOT NULL,
[LEADSOURCEID] [STANDARDID] NOT NULL,
[CREATEDATE] [datetime] NULL,
[CREATEUSER] [STANDARDID] NULL,
[LEADDATE] [datetime] NULL,
[MODIFYDATE] [datetime] NULL,
[MODIFYUSER] [STANDARDID] NULL,
CONSTRAINT [PK_CONTACT_LEADSOURCE] PRIMARY KEY CLUSTERED
(
[CONTACTID] ASC,
[LEADSOURCEID] ASC
) ON [PRIMARY]
) ON [PRIMARY]


You'll notice the clustered primary key constraint on contactid and leadsourceid.

Quote:
Originally posted by Scott Hill

how woud I go about updating a LeadSource record if there is no primary key on the table? Do I have to run an update with two parameters in my WHERE clause?


Yes (or join on both values).
[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): 4/29/2024 3:13:52 PM