On Prem development machine, I'm writng a deployment routine in c# using the client object model. I've created some site columns of type Lookup, I've created a content type and added those lookup columns to it and I've created a list using the content type. I want to set the RelationshipDeleteBehavior property on some of the lookup columns in the list. I'm also using the 16 assemblies.
List list = cc.Web.GetListByTitle("MyList");
cc.Load(list);
cc.ExecuteQuery();
Field f = list.Fields.GetByInternalNameOrTitle("MyLookupField");
cc.Load(f);
cc.ExecuteQuery();
(fasFieldLookup).RelationshipDeleteBehavior =RelationshipDeleteBehaviorType.Restrict;
f is returning as a Field but (fasFieldLookup) is returning null here. Any insight on this?
Thank you.
Dan Budimir