Announcement

Collapse
No announcement yet.

Fill Quote Name from Quote Items

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Fill Quote Name from Quote Items

    Hi there,

    I would like to create a workflow with target entity Quote that take as a variable the Quote Items included.

    An example could be: If the quote status is "Approved" and is contained the "Item 1" -> do a specific action.

    Since the Items could be more than one, I didn't find in the workflow option the possibility to work on the Quote Items. For this reason I tried to work with the Formula but didn't work. Please check the attached screen.

    Other option I can fill the Quote name with the Quotes Items names thought a workflow. Also in this case since the Items can be more than one I cannot copy the name from the items to the Quote.


    Do you have an idea how can I solve this??

  • #2
    Hi Frank,

    First you may need this function to fetch the list of linked quote items:

    https://docs.espocrm.com/administrat...indrelatedmany

    Then you loop over the related entities using this:

    Example: $source = list(0, 1, 2); $target = list(); $i = 0; while($i < array\length($source), $target = array\push( $target, array\at($source, $i) ); $i = $i + 1; );


    Then you use this function to fetch the name of every quote item entity:
    https://docs.espocrm.com/administrat...ecordattribute

    Needs some effort but I think you can do it, not sure

    NOTE: the while formula seems not merged yet, will wait till 5.9.2 release!

    NOTE: I not tested, just referring to the resources

    Best Regards
    CEO & Founder of Eblasoft.
    Professional EspoCRM development & extensions.

    Comment

    Working...
    X