Questions about How to Add a Record Thread Widget in SuiteCRM 8

Video code: https://suitecrm.com/suitecrm-developer-insights-record-thread-widgets/

Video tutorial: https://www.youtube.com/watch?v=3XOoVTpznyc&t=31s

According to this video, I implemented adding weight at the bottom of the record. But the one associated with the parent class is

'parentFilters' => [
'id' => 'parent_id',
],

But what I want to associate is not the id primary key, but other custom values ​​(custom_id, which may not exist, that is, it may be empty/null). If custom_id=empty/null, all data will be displayed (obviously wrong).

  1. I use workflow to solve this problem. When I add a new record, the value of custom_id will be automatically filled. This can be solved, but it is a bit troublesome because there are too many modules involved.

  2. I want to add a judgment in this video code. If custom_id=empty/null, return null and do not display bottom weight (but I don’t know how to write it at present)

  3. Are there any other solutions?

https://docs.suitecrm.com/8.x/developer/extensions/frontend/logic/operators/

This method should also be able to solve it?

Yeah, try to use those conditional statement in your code and test it out.