View Single Post
  #1 (permalink)  
Old January 21st, 2013, 06:52 PM
richv richv is offline
Authorized User
Points: 95, Level: 1
Points: 95, Level: 1 Points: 95, Level: 1 Points: 95, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2010
Posts: 21
Thanks: 1
Thanked 0 Times in 0 Posts
Default Problem setting the value of an external list lookup column.

Hello all...

I have an external list (based on ECT of course). The list is working great with no problems.
I have created a lookup column based on that external list and attached it to a standard SharePoint list.
All is working with, with one exception.
I need to set the value of the external lookup column programmatically.

I cannot seem to find an example of this.

To summarize, I'm trying to set the value of the external lookup column programmatically on my secondary list.

External List: Customers
External List Lookup Column: CustomerLookup

Standard SharePoint List: Job List
Columns: Title (standard SP Title), JobDate (standard Date Time column), CustomerLookup (lookup column from above).

How do I set the value of the item?

SPListItem item = ....
item["Title"]= "My Text";
item["JobDate"] = somedatevalue;
item["CustomerLookup"] = ??????

Thanks in advance!
Reply With Quote