Works great Scott. Thanks for taking the time.
Using the URL, I managed to get it working easy enough. Some of the code from the URL was misleading, so I am putting the code sample here, slightly modified with a little more description.
Code:
class Program
{
private static string _sSiteURL = @"http://mysharepointserver/sites/renewals2/sub";
static void Main(string[] args)
{
using (SPSite site = new SPSite(_sSiteURL))
{
using (SPWeb web = site.OpenWeb())
{
Console.WriteLine("Site: " + site.Url);
SPList list = web.Lists["TestList"];
SPListItem spItem;
spItem = list.Items.Add();
spItem["Title"] = "My Test Title";
// Get a reference to the lookup field
SPField myField = spItem.Fields["Customer Lookup"]; // "Customer Lookup" is the display name of the field
String lsBCSRelatedFieldName = myField.RelatedField; // get the name of the actual primary key related field
//Set the Entity Instance value
int id = 11662;
spItem[lsBCSRelatedFieldName] = EntityInstanceIdEncoder.EncodeEntityInstanceId(new object[] { id });
//Set the field display value * Please note that the display value is actually unnecessary and can be set with anything.
// this will get overwritten eventually from the external content type.
spItem["Customer Lookup"] = "Some customer name value.";
spItem.Update();
list.Update();
}
}
}
}