As you all know a CRM lookup only displays its related entity primary field. Although this can not be changed using existing customizations; in most cases that suffices. However, there are occasions where you want to display another information in order to avoid opening the related entity form.
So I created a generic JavaScript function to display another attribute inside CRM lookup. On a contact form you want to display the accountnumber field, inside the parent customer lookup, instead of primary field of the account entity.
Before:
After:
To see how I did this, visit my my blog.
Cheers,