i tried adding this code to ConvertRecordAction.php file but i keep recieving this errror
[FATAL] Bean file does not exist in path: modules/Prospects/Prospect.php
The error means SuiteCRM can’t find the bean file for Prospects. Make sure there’s a Prospect.php inside modules/Prospects, and that it’s properly set up in the module’s vardefs and modules.php.
Also, yes — using $this->init() and $this->close() is a good idea if you’re inside the controller flow.
About converting Targets like Leads — it’s not built-in like Lead conversion. You’ll need to custom-create a similar view and logic for Targets if you want that same experience.