Method to find if customer has open transactions

In a CRM form, I would like to put a column with an information about the client’s open titles.
Today we have 03 companies (dataareaid) and the customer can buy in any of them.
I would like to create a method that verifies if the customer has open transactions in the company other than the one I am using at the time of the quote.
If there is some record in a dataareaid other than the current one used, the column fills with YES, otherwise, with NO.
How can I proceed?

Is this related to AX? If so what version?