Reputation: 343
I have created 'Customer' datatype in one of our custom entity. From there if I try to query to find whether the customer is of contact/Account by using the following query,
SELECT customer FROM entityname
INNER JOIN contact ON ContactId=contact_account_customer
I am getting error saying invalid column name. I would like to know whether the relationship name to contact and account is useful to find whether customer is contact or account. If not whats the use of this relationship name?
Upvotes: 1
Views: 132
Reputation: 22846
Try this:
Entity Name: new_promotionaloffer
Attribute Name: new_luckycustomer
SELECT new_luckycustomer FROM new_promotionaloffer E
LEFT JOIN Contact C ON C.ContactId = E.new_contact_new_promotionaloffer_LuckyCustomer
LEFT JOIN Account A ON A.AccountId = E.new_account_new_promotionaloffer_LuckyCustomer
Upvotes: 1