I decided to combine the 3 items under one post since they are often requested together and the process for each is very similar.
You may also want to review my post on Customizing the Activity Form since it is likely you will want to add a lookup to the activity dialog to reflect your new custom entity. I tested these on an 8.1 instance today but the customizations should be the same in any 8.x environment.
To add an attachments tab for your custom entity is simple:
- Add an ID property on the attachment entity corresponding to the entity. The name is important not NOT case sensitive – it must be the entity physical table’s name + “Id”. For example, if the entity table is “C_PROJECT”, the property should be named “C_ProjectId” (or C_PROJECTID if you are into upper case names). The actual name of the field in the database is not important. Note you can also use the entity name instead of the table name but that does not work for the activities and notes/history tabs so for consistency I recommend making all 3 the same.
- Add the “AttachmentList” custom smart part (from Custom / SmartParts / Attachment) to your entity’s detail page.
This is an easy one because it’s almost the same as the attachment tab 🙂
The only thing is you need to make sure you use the table name, not the entity name (if they are different). While the attachment tab has some code to handle one or the other, the activities tab does not.
So just make sure you have the property declared on the activity entity and add the smart part (Custom / SmartParts / Activity / ActivityList) to your page.
Similar to Activities – make sure you have the property declared on the history entity and add the Custom / SmartParts / History / HistoryList to the page.