Fixed bug in externalId

Updated tests to reflect the new configuration and fixed problem with
hardcoded custom searchfield.