where clause in selection-list view

Hi All,

I would like to filter a related record when users tried to link between the two.

I saw orderBy clause inside root/modules/modulename/clients/base/views/selection-list.php

I was able to modify the orderBy clause but I couldn't modify the where clause.

I used the following keywords in that selection-list.php

'where'

'queryWhere'

'whereClause'

'whereClauses'

'whereRaw'

none of them work for me. I also supplied the array for the where condition.

this is what I tried as the where parameters :

where_keyword_that_listed_above => 'tablename.field = 'Active';

where_keyword_that_listed_above => array("tablename.field = 'Active'",),

where_keyword_that_listed_above => array('equals' => array('field' => 'status', 'value' => 'Active',),),

Since none of those work for me then I moved on to the before_filter logic hooks for that module

I placed it in custom/modules/modulename/

here is the logic_hook.php

here is the oppProjCustomHook.php

however I didn't see anything in the log. I do notice that the before_filter is not meant to display any output and I think logging it is not considered displaying any output.

so two questions:

1. Can I add where clause to the selection-list view?

2. when is the before_filter trigger? I tried to refresh the parent record and also when I went to the Selection-List view (by clicking the Link existing record button in subpanel).

Parents
  • Update:

    I am able to run my custom logic hooks for before_filter. I forgot the [] after $hook_array['before_filter'].

    However when I tried to modify the query options in $arguments[1] it did not take effect.

    for example I did try limiting the query it should return or I changed the way it order by.

    I print_r the arguments object, it saved my changes, meaning when I do this:

    $arguments[1]['order_by'][0][1] = 'DESC';

    it did not change the sort on the selection-list view.

    initially the sort order was ASC, I changed it to DESC, I print the object and it showed the order_by is DESC

Reply
  • Update:

    I am able to run my custom logic hooks for before_filter. I forgot the [] after $hook_array['before_filter'].

    However when I tried to modify the query options in $arguments[1] it did not take effect.

    for example I did try limiting the query it should return or I changed the way it order by.

    I print_r the arguments object, it saved my changes, meaning when I do this:

    $arguments[1]['order_by'][0][1] = 'DESC';

    it did not change the sort on the selection-list view.

    initially the sort order was ASC, I changed it to DESC, I print the object and it showed the order_by is DESC

Children