Preselect Effective when users open document

Can anyone tell me how can i preselect Effective on documents when user opens the search grid as can be seen below

Parents Reply Children
  • Yes! It´s possible for admins to write custom settings into the individual user "Preferences". But people can still overwrite them later. Sometimes you have will to reset user Preferences for bug fixing reasons and of course need to update the stuff again. The AML query itself is not the easiest one. And each upgrade will probably enforce a reset of the preferences. It will be FUN!!! Do it and let me know your experience! Thanks! :)

    My previous tests with Preference overwrites never made in into production. That´s the reason why I right now embed it in the training. In our case changing the query type it´s more a recommendation, not a strict rule. 

    But just as I am writing this text I have a better idea:

    --> We can always replace the existing CUI elements with our own variants! 

    Make a duplicate of CUI element "searchview.commandbar.default.querytype" and use your own init Method. Using a custom element will overwrite the dropdown for the ItemTypes where you use it.

    Your init Method will be 99% identical. Don´t change the default list! Just select another init value in this code line:

    const queryTypeValue = aras.getPreferenceItemProperty('Core_ItemGridLayout', itemTypeID, 'query_type', 'Current');

    Maybe add some hints in the Method that it´s a duplicate from something else and why you do it.

    In theory you could also just modify the original Method to use a different default dropdwon value for your specific ItemType. But modifying OOTB Method is always messy in package exports and upgrades. 

    I haven´t tested it, but I expect it to be perfect!Sunglasses