June 24, 2013

Restrict certain queries on BC/EBC/VBC : GetSearchExpr()

Recently someone posted requirement on it toolbox to capture and change the queries executed by user on certain Siebel business components.

Few consultant suggested use pre query event of business component to change the search spec using GetSearchExpr and SetSearchExpr, however it is not possible to achieve this without releasing srf.

Perhaps there was a solution which could be achieved without releasing srf.In such type of requirements we can use Siebel Run Time events and client side business services which are independent of srf release.

To change the query executed by user we created an RTE on BC PreQuery event and invoked a Siebel client side business service.

Script is as follows:

var bo = TheApplication().GetActiveBusObject();
if(bo== null)
var bc = bo.GetBusComp("Action");

GetSearchExpr returned the query which is requested by user, as event is PreQuery thus we could change the query before it is executed on the database.

This solution can be used on VBC / EBC where we want to restrict the user to avoid high processor or high cost queries.

Following are events which are available on business components:
Table 14. Server Side BusComp Events

1 comment :

  1. >> This solution can be used on VBC / EBC

    AFAIK, search specifications won't work for EBC