ssossossossosso

Forums

Forums OroPlatform OroPlatform – How do I? Questions How to manually render workflow transition buttons?

This topic contains 6 replies, has 3 voices, and was last updated by  Mike Kudelya 1 year, 1 month ago.

  • Creator
    Topic
  • #30634

    Stepan Yudin
    Participant

    Hi everyone!

    Yesterday i faced a problem. I have an entity template. In this template i render a list of some related entities.
    For each of these entities i want to render available workflow transition buttons.

    I do it like that:

    So, buttons renders successfully. But when i click to any transition button – im redirected to corresponding workflow api url. And entity workflowStep is not changed.
    If i open this entity in separate template (where the transition buttons rendered in the head of the page, by default) – all transition handled correctly.

    So, how to render these buttons in any place and make em work?
    Thanks!


    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform
    https://github.com/stepansib/sf-oro-docker

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #30635

    Mike Kudelya
    Moderator

    Hi,

    The easies approach is wrap oro_widget_render into

    #30636

    Stepan Yudin
    Participant

    Hi, Mike.

    Thank you, that works! Maybe you can help me with ‘workflow_widget_steps’ rendering too?
    Im trying to render this widget for every child entity, but it renders in the page header (not in specified template div and overrides parent entity’s steps widget)


    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform
    https://github.com/stepansib/sf-oro-docker

    #30637

    Mike Kudelya
    Moderator

    I have made example for you, of course it needed to some modifications and checks, but it works. Put this code to your view page:

    and replace this file with following code:

    #30638

    Stepan Yudin
    Participant

    Thank you Mike, you saved me)
    Im not so familiar with JS but i understand your modifications to widget placeholder
    Many many thanks to you man!


    Docker environment for Symfony2/OroCRM/OroBAP development on Windows platform
    https://github.com/stepansib/sf-oro-docker

    #30639

    Bhavesh Tailor
    Participant

    Hello Mike ,

    I am trying to merge sales and opportunity process . I did created on save opportunity sales process automatically created with work and step id . now i want to add workflow transition button on opportunity view page .

    Thank You in advance .


    Bhavesh

    #30640

    Mike Kudelya
    Moderator

    Hi

    You can add buttons via ‘/workflowdefinition’ page or just add/modify workflow by adding it to config. See workflow examples.

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

You must be logged in to reply to this topic.