change getPreferredIdbyGID to call stored procedure "getPreferredIDNamesRecordByGid"

Issue: GCP-8816

Reviewer: Darla (post-commit)