In the manifest file, we have the option to add customlinks (which will become business actions), but can we also specify the 'Only on my module' option? And if yes, how? Something like this?
PHP Code:
<customlink>
<linktype>DETAILVIEWWIDGET</linktype>
<linklabel>InventoryDetailsBlock</linklabel>
<linkurl><![CDATA[block://InventoryDetailsBlock:modules/WorkAssignment/InventoryDetailsBlock.php]]></linkurl>
<linkicon><![CDATA[]]></linkicon>
<sequence>0</sequence>
<handler_path><![CDATA[]]></handler_path>
<handler_class><![CDATA[]]></handler_class>
<handler><![CDATA[]]></handler>
<onlyonmymodule>1</onlyonmymodule>
</customlink>
Seems a bit dubious, since there are two fields in business actions: one checkbox 'onlyonmymodule' that turns limiting on or off, and a 'modules' field that tells which modules the business action should apply to.
This seems to indicate it applies to the checkbox, so maybe we should update the import code so that it reflects the fieldname/columnname better?
There are some link types that, by default apply to all modules, no matter what module is selected in the module list. Namely
'HEADERSCRIPT_POPUP', 'HEADERCSS_POPUP','FOOTERSCRIPT', 'HEADERLINK','HEADERSCRIPT', 'HEADERCSS'
these normally make sense to be this way, but from time to time you want one of these types only on some modules. In that particular case you can use the OnlyOnMyModule checkbox to revert these to the default behavior of respecting the module selection.
So, I think it is correct as it is. What do you think?
Well the way I see it we have two directives:
- Only on module
- Only on my module
The way I see it the first one is a list of one or more modules you want to limit your business action's application to, with the exception of the types you mentioned. The second is the checkbox that enforces the application of the business action to be limited to the modules in the aforementioned list. If I look at the code, it looks like the name of the first item in the list is actually performing the function of the second, which I think is confusing. I'd rather do:
Code:
<onlyonmymodule>1</onlyonmymodule>
<onlyonmodule>
<module>SalesOrder</module>
<module>Accounts</module>
<module>Quotes</module>
</onlyonmodule>
Would you agree?
then we don't have support for the module lists in the manifest file
yes, I would agree on adding the module list in the manifest file (and also in the call). the name can be onlyonmodules or onthesemodules