No announcement yet.

Inherit custom entity "Project" from Quotes when creating a new salesorder?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Inherit custom entity "Project" from Quotes when creating a new salesorder?

    Hello EspoCRM community!

    our business process in EspoCRM is as following:

    Project --> Quote --> Sales Order

    Steps and further information:

    1. Creating a project (custom entity)
    2. Adding a quote to a related project (quote n:1 project) and send it to customer
    3. If customer accepts quote, a sales order would be created. A previous quote is necessary. There is also a relation to project (salesorder n:1 project)

    Is there a way to inherit the project automatically from quote to sales order, if i create a salesorder from the quote view? Like the same way the Customer is inherited in this case?

    Click image for larger version

Name:	salesorder-project.PNG
Views:	335
Size:	50.9 KB
ID:	74631

    Thank you very much for your replies!

  • #2
    Hi, there are multiple ways how to achieve your desired functionality. For example, I would make the field "Project" read only and set the tooltip of that field to something like "Read only field. Project will be automatically set when you create the order."

    Ways to achieve it:

    1) If you have an Advanced Pack, you can create Workflow that will set the Project.
    2) Formula function to fetch Project on quote and set the Project.
    3) Programming the logic to SalesOrder entity using afterSave() method - it would get the related Project from Quote and set it to Order.

    Have a nice day!


    • #3
      Hello alter,
      thanks you very much! I followed your suggestion.

      Set the "Project" Field in Sales Order to read-only and added a formula in sales order entity:

      Perfect! Have a great day, too!


      • #4
        And how to do IT with workflow? I need to create new project when entity status in contract is value "payment".

        Thank you for your help


        • #5
          Create a workflow rule with After Save trigger. Add a condition that checks that the status value is changed, add another condition that checks whether the status equals "payment".

          Then add an action that creates a new Project.