Fixing field creation

Reference to recordindatabase function wasn't a good idea as i.e internalid doesn't have such function and when creating new list with table the pk field and table was never created