i’ve a question about the PickerField component. What i want to change it the default open type of the LookupAction to DIALOG instead of THIS_TAB. to achieve this, i thought of the following possibilities:
change the browse screens with the DIALOG mode in the XML browse definitions with this snippet:
change the open type programmatically in the screen with the PickerField
extend the WebPickerField with a custom class and register it as the default PickerField class (how would i exactly do that?)
Besides the possibilities to do this on my own my question would be if it is possible (and makes sense) to make this setting configurable. What do you think?
Now you can customize a LookupAction only on the screen level - either in XML using openType=“DIALOG” attribute, or programmatically in the controller. Changing the lookup action globally on the project level is hardly possible, the same as for other standard actions. I think it is a shortcoming, and we should provide a simple way to create own implementations of standard actions. Making a configuration parameter just for one particular action would be too partial solution.
this sounds reasonable. But would the third approach not fulfill the needs? Although it is questionable if this is a good idea to extend the FW in such a way.
Another thing that came to my mind is that i can use the lookup screen xml and adjust the settings in the every ${entity}-lookup.xml file. This works with the minor downside that changes in the browser screen for an entity has to be copied to the lookup screen. But one major drawback is that i can’t get studio to create an additional lookup screen file (anymore?! - i’m not really sure).
Is the ${entity}-lookup.xml mechanism a thing that is deprecated or why is there not much information about it in studio and or in the docs?
Regarding multiple lookup screens for an entity: you can create as many screens of any type as you want, but the standard LookupAction will use by default first a screen with {entityName}.lookup id, if it is not found - {entityName}.browse. If you create an additional lookup screen with a different id, you have to specify this id using LookupAction.setLookupScreen() method.