Forums OroCRM OroCRM – Installation/Technical Issues or Problems Lead to Account creation – workflow issue

This topic contains 2 replies, has 2 voices, and was last updated by  Madhur 1 year, 7 months ago.

  • Creator
  • #24518



    I am trying to convert a lead to an account using workflow. I have also added an Account field in Lead entity to keep a relation between the two. One account can have many leads. The requirement is something like that. I am reusing the Lead entity instead of creating another entity for my requirement.

    I have changed the Lead Status to have more options that just the New, Qualified and Cancelled. So lets consider that I have the following lead status options: New, BDC Follow up, Sales Won and Lost.

    When the Sales is won I have to create an account based on the values in Lead and associate the newly created account with the Lead. For this I have written the following workflow. I am just pasting the transitions and transition_definitions YAML files here.


    And transition_definition.yml I am only pasting the sales_won definition as other transitions are working fine:

    I am getting “Could not perform transition” message after clicking on the Sales Won workflow button on the Lead View Screen. I checked in the logs and I only found a “doctrine: rollback” message. There is no error nor any exception in the logs.

    What am I doing wrong? I have written my workflow based on the Unqualified Sales Lead workflow given in the OroCRM Sales Module. All other workflows belonging to Lead entity have been deactivated.

    Can anybody please tell me where am I going wrong?

    Thanks and Regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #24519

    Mike Kudelya


    Could you please provide http response of ajax call which returns “Could not perform transition” ?
    Do you have all fields which described in data section, for example zip, state, etc..?



    Hi mikekudelya,

    I changed the code as below and the workflow is working now. And yes, the job title field was not there in Account. That was one mess up from my side. Then I also added the attribute “account (orocrm_account_select)” to the transitions.yml file. This I had missed. If the lead belongs to an already added account, then the user can have the option of choosing this account in the transition form itself. If it is left blank then the account will be created.
    The code now looks like this:


    Instead of using the $.result.account I used the attribute used in the attributes.yml file for account ($account). I think this solved the problem.

    This was still a trial where I am searching for the account by first name which is not right. I have to add more fields like “phone number” or “email” to get the exact account. Once that is selected then I will associate the found account with the newly created lead. If not found then create the account. Hopefully I will be able to complete the workflow without any more issues. 🙂

    Thanks and Regards,

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

You must be logged in to reply to this topic.