Covering OroCommerce, OroCRM, OroPlatform topics, including community updates and company announcements.

Forums OroCRM OroCRM – How do I? Questions Datagrid add parameter for yesterday

This topic contains 3 replies, has 2 voices, and was last updated by  Viacheslav Bemza 9 months, 1 week ago.

  • Creator
  • #29499


    I would like to include yesterday date in my select query for comparison. In MySQL we can easily get the date part using DATE() but in Doctrine we don’t have that functionality.

    I tried to bind it as a parameter but that does not work with the error “You cannot define a mapping item when in a sequence in”

    The use case is that in the datagrid I want to color the overdue dates with red so I add a class. The followup_date is a datetime field. I’m ok with filtering by date or datetime but just don’t see any way. Can you please help?

    As such doctrine is proving to be very restricting when it comes to datagrids.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
  • #29500

    Viacheslav Bemza

    Hello, oro_newbie!

    You can just fetch caseEntity.followup_date and check it in twig template. I suggest you to read this documentation.



    Thank you so much! I did the below:

    And the twig template:

    It works! Although I can only color that column data not the whole row, but it’s okay for now :) Thank you!


    Viacheslav Bemza

    You’re welcome 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

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

Yes No
sso for www.magecore.comsso for oroinc.comsso for oroinc.desso for oroinc.frsso for marketplace.orocommerce.comsso for