unable to perform javascript while creating a layout in suitecrm 8.9

I created a custom module using Module Builder in SuiteCRM 8.9. After deploying the module, I am unable to execute JavaScript actions while working with the layout (specifically during record creation).

Additionally, I noticed that my module’s folder is not appearing inside the custom/ directory as expected. Instead, SuiteCRM 8.9 uses the extensions/defaultExt/ path for overrides, which is different from SuiteCRM 7.x.

I am sharing the directory hierarchy and the code snippets I used, so you can help me identify what I might be missing.

Its not that easy to add javascript to a SuiteCRM 8 module, you would need the developer install and to compile angular code and use that instead.

However from that first snippet you may not need to it looks like you are trying to make a field conditionally required which is possible using the vardefs/detailviewdefs files in Suite8 for Suite8 modules (check the docs site for instructions on that).

Mark