
Announcements
Hi all!
I am looking at how to do add a field to my custom entity that is of type "Lookup" and is related to multiple different entities. I know that some activities, like Email, have a field called "regardingobjectid" that has a relationship with many different entities. When I went to see what entity this field was related to, I found it looks-up to "knowledgebaserecord."
My question is, what is this entity "knowledgebaserecord?" I can't find it in CDS and it seems to be only associated Dynamics365. If I want to add a field that is type Lookup and has a relationship with multiple entities, would I make that field's related entity "knowledgebaserecord?" Is "knowledgebaserecord" also how you achieve a Many-to-Many relationship in CDS?
Thanks!
Hi @Anonymous
The KnowledgeBaseRecord is an old legacy entity for Dynamics 365 which was used for the knowledge base functionality. KnowledgeBaseRecord is a special entity like activities which has a Regarding lookup field associated with it. This is really a red herring in your situation and I would not worry about it.
Unfortunately, the Regarding field is a special type of lookup field that only comes with certain out-of-the-box entities like activities. You cannot add a Regarding lookup field to a custom entity (unless you are creating a custom Activity entity). You will have to add multiple lookup fields - one for each entity that your custom entity relates to. Alternatively, if it makes sense that your custom entity could represent a activity entity then it might be worth creating your custom entity as an activity entity - you will then have a regarding field automatically added to it.
Hope this helps.