OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums OroCRM Unvalid data_name for Datagrid Listener Filter

This topic contains 0 replies, has 1 voice, and was last updated by  a.azadi 2 weeks, 2 days ago.

  • 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 2 weeks, 2 days ago by  a.azadi.
    • This topic was modified 2 weeks, 2 days ago by  a.azadi.

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No