OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM Unvalid data_name for Datagrid Listener Filter

This topic contains 0 replies, has 1 voice, and was last updated by  a.azadi 4 years, 10 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #39065

    a.azadi
    Participant

    Hi everyone.

    I need to use a filter in my datagrid listener. I want to set a filter in my datagrid which its data_name is not valid because I want to do my join and add my where in my listener.
    I have 2 column.
    One is static in datagrid which I am adding the where clause for it in preBuild method. Here is the code for this method:

    My first problem is this method is not giving me the right result. I can see the query is adding my where clause and also in onBuildBefore I checked my query. The where clause is set. But it’s not working.
    Ok. Now my second problem is with adding the data for second column in my onResultAfter which I need to add the filter to its query too.
    Here is the code:

    As you can see I am adding same filters to this query too(city and etc. I have these in my datagrid with valid data_name).
    But I can’t add businessUnits to this query because when I set the filter in view onResultAfter won’t be called.
    This is my main problem.

    The main question is how can I make onResultAfter being called even when I’m using unvalid data_name for my filters? Is there any other way so I can add my join and filter in listener? Also with this problem I can’t get my sql and see what is my native query and why my first problem is happening.

    My oro version is 1.8

    Thanks,
    Aryana

    • This topic was modified 4 years, 10 months ago by  a.azadi.
    • This topic was modified 4 years, 10 months ago by  a.azadi.

The forum ‘OroCRM’ is closed to new topics and replies.

Back to top