Monday, November 28, 2011

Hiding Custom Controls in Query Mode

"Yesterday it worked, Oops Today it is not working..."

This has to be my favourite line since i started my career. I was hit by the same nuke again by my team mate where we had to hide custom controls from the users in Query Mode. Some code was written to control the visibility of the custom buttons but it was failing in some conditions.

It is easy to control the above scenario when we have different applets for Edit and Query Mode. We can remove the custom button from the Query Applet and keep only on the Edit applet. However, things are little different in case we are using Edit List Mode. A custom code is viable solution but it is not full proof as there are chances that it may fail.
However Siebel comes again to our ally. For lucky developers who are working on SIA tools, there is a user property by which one can hide methods in Query Mode. 

Name: FINS Query Mode Disabled Method n
Value: Method Name 

The only catch here is the applet class should be "CSSFrameListFINApplication". So better test the entire functionality prior deployment.

Happy Configuration!!

2 comments:

Anonymous said...

Great tip. This User Property should not be necessary -- that is why the HTML Type property values of MiniButtonEdit, MiniButtonNew, etc. were created to auto hide and expose buttons in or out of Edit and Query modes. This property unfortunately does not work for custom controls.

There is also a defect opened related to this user property itself (see Doc ID 1315318.1) although it's obvious the customer and the support engineer ignored the need to have the specialized class on the Applet.

Siebelish said...

Hi Anonymous,
Thanks for the comment and reference. Yeah this user property is truly magical in sense that this can be used for custom controls irrespective of applet mode (Edit/Edit List/).

Regards,
-Rahul-