OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums 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 6 years, 2 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
  • #29499

    oro_newbie
    Participant

    Hi,

    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
    Replies
  • #29500

    Viacheslav Bemza
    Participant

    Hello, oro_newbie!

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

    #29501

    oro_newbie
    Participant

    @Vicheslav

    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!

    #29502

    Viacheslav Bemza
    Participant

    You’re welcome 🙂

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

The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.

Back to top