Get invoice's custom fields

Get invoice's custom fields

Getting invoice with certain invoice_id, shows custom fields. If I want to get invoice by other fields, custom fields array is empty. 

Any solution?