SPField.SourceId property
SharePoint 2013
Gets either the namespace that defines a built-in field or, if it a custom field, the GUID that identifies the list or Web site where it was created.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)