One of the interesting requirement that I worked in recent past is to show case notes (annotation) from Child entity on to Parent entity. Initial understanding was to copy any annotation added on child entity to annotation on parent entity. However, soon realized that this will mess up parent record. Result is an awesome tree control built in PCF.
In our scenario we have a parent record as case entity and child record as Task entity. Each parent record can have 15-20 child entities.
Created this tool using one of the tree controls available in PCF Gallery. I am sharing the source code so any one can download and extend it for their use.
When you click on Notes Node it will expand and show the actual notes entered
You can download source code from here. Once downloaded and restored all NPM modules, control can be executed to see the above output.
Source code also has fetch queries which be me updated to suit your requirements. Please update GetCaseNotes method with all related fetch queries.
Once all queries are updated you need to comment the test method call in INIT method and uncomment real method.
Lines 37 and 40.
Control also has a CSS included so that colors can be changed as required. Hope this Helps.