OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Custom datagrid action

This topic contains 22 replies, has 3 voices, and was last updated by  Mike Kudelya 7 years ago.

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

  • Creator
    Topic
  • #34192

    adriwan_kenoby
    Participant

    Hi,

    I work on a project that aim to monitor website.

    So I have an entity, named Alerte, which is create or update automatically. I don’t need ( and I don’t want) a form associated, no one have to manage this entity ( create or delete) but in some case i need that a user can update just one field which contain a DateTime. So I want a button, when i click on it, it update this entity field with new DateTime but i never need a update page with form.

    I found a lot of information but none really is that i want.

    I follow this tuto : http://www.ibnab.com/en/blog/orocrm/orocrm-create-custom-grid-action-technique-and-secret

    But i found these informations too :
    https://github.com/orocrm/platform/blob/11114aa77cb972f82038592bb743c96cf7fb1c2f/src/Oro/Bundle/ActionBundle/Resources/doc/configuration-reference.md#substitution-of-action
    https://github.com/orocrm/platform/blob/master/src/Oro/Component/Action/Resources/doc/actions.md

    I think that I can do what i want with just configuring an action.

    I really need to undestand how it works.

    My code :

    But maybe something like this can be done :

    But i dont understand how it works.

    Thanks for replies.

    Adrien

Viewing 7 replies - 16 through 22 (of 22 total)
  • Author
    Replies
  • #34208

    Mike Kudelya
    Participant

    Hi @terih,

    You can’t configure column width and height in datagrid.yml. I propose you change sizes through css.

    #34209

    adriwan_kenoby
    Participant

    To use conditional logic for action foolow this link : https://oroinc.com/orocrm/forums/topic/showhide-icon-in-datagrid

    #34210

    adriwan_kenoby
    Participant

    The datagrid custom action not working since version 2.0

    Could you help me to find the change I have to make ?

    #34211

    Mike Kudelya
    Participant

    Hi

    Could you please tell me whether the action simply disappears, or you just get some errors? Also, please, note that since version 2.0, many yml files in /Resources/config have moved to subdirectory oro.

    #34212

    Mike Kudelya
    Participant

    By the way, I have created an action in Resources/config/oro/actions.yml that could change the account name. The action has appeared on grid action block and works well.

    #34213

    adriwan_kenoby
    Participant

    This is the error I have :

    Script error for “oro/datagrid/action/custom-action” http://requirejs.org/docs/errors.html#scripterror

    #34214

    Mike Kudelya
    Participant

    The described error message is, unfortunately, not enough to understand what is wrong. Could you please show me a more detailed error which could be appeared in Chrome/Firefox DevTools? Also, have you had a chance to look at the OroCRM ‘operation’ feature described above? Perhaps, it may be easier to do a datagrid action?

Viewing 7 replies - 16 through 22 (of 22 total)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top