Suitecrm 8.3 Version -- view.edit.php how to include JS file

Hi,
I’m looking for a validation where i need to add JS file to opportunities module.

  1. included file in SuiteCRM-8.3.0\public\legacy\custom\modules\Opportunities\editviewdefs.php\metadata\editviewdefs.php

code added as below :
‘includes’ =>
array (
0 =>
array (
‘file’ => ‘custom/modules/Opportunities/CustomJSFile.js’,
),
),

  1. I’m extending the editview – SuiteCRM-8.3.0\public\legacy\custom\modules\Opportunities\views\view.edit.php

** Do i need to include the JS file here in view.edit again ? – tried adding here got an error-- “error occurred while fetching metadata”.

** Please let me know how to resolve this

If your Opps module is not in legacy mode, if it is using the new UI, then that code will have no effect at all.

Search these forums for legacy.module_routing to learn how to change the mode of specific modules.

There are better and newer ways of injecting JS into the new angular views, but we’re still waiting for Documentation on how to do it.

regarding Documentation: are there now already more detailed Dev-Docs available? i could not find anything in Detail.