How to reference the "added" properties of a Filtered Lookup field from code

Jan 8, 2014 at 7:14 PM
How do I access the "added" fields of a Filtered Lookup from C# code? For example:
SPField field = myList.Fields["myFilteredLookup"];
field.ListViewFilter = "123";
Gives an error because the property .ListViewFilter is not defined in the SharePoint definitions. Is there a way to either add the definition, or to use reflection in some way to get a reference to this field?
Jan 15, 2014 at 4:14 PM
You can fetch this property value from the field using the SPField.GetCustomProperty("ListViewFilter") method.