Map fields for retrieve fields and sort

Added support for mapping retrieve fields and sort