ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

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 1 month, 1 week ago.

  • Creator
    Topic
  • #58429
    oro_newbie
    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
  • #58430

    Viacheslav Bemza
    Moderator

    Hello, oro_newbie!

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

    #58431
    oro_newbie
    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!

    #58432

    Viacheslav Bemza
    Moderator

    You’re welcome 🙂

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

You must be logged in to reply to this topic.

ssossossosso