I'm working on a project where we'll be creating two different custom post types: Machines and Enquiries. The Machines posts will be created by admin, and will simply be a list of items that are for sale (although this isn't an e-commerce site). Enquiries, however, will be created by users via a form displayed on the front-end. When a user submits an enquiry, they must select whether they want to buy or sell - if they are buying they must then also specify a machine.
The client has expressed that they would like to be able to see which machine the enquiry relates to in both the Enquiries admin columns, and in the Enquiries edit pages. This would obviously be non-editable, but it could be the Machine post title, SKU, or a link to either the Machine edit page or front-end - or any combination thereof.
So my question is:
When creating and saving an Enquiry post type, is there a way to query the Machines post types (i.e. the Machine submitted with the user's enquiry) and, with that Machines's row data, add a field to the Enquiry post that can then be displayed on the enquiry edit page, or admin columns?