Announcement

Collapse
No announcement yet.

Workflow - access targetRecord attribute when updating relatedRecord attribute

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

  • Jakub Grufik
    replied
    lazovic oh yea I completely understand that it is basically guessing from your side if you do not have enough information.

    Please check the attached screenshots and I would be more than happy to provide you with more information if needed.

    Some quick info:
    Workflow targets entity "opportunity"
    Screen1 = settings of the workflow
    Screen2 = settings of the workflow
    Screen3 = formula of action you helped me with
    Screen4 = formula of action I want to use to update the assigned user´s attribute IF opportunity.contact.addressState = one of listed values

    Hope its more clear now.
    Thanks a lot, man!
    Attached Files

    Leave a comment:


  • lazovic
    commented on 's reply
    In fact, it is difficult to focus on small pieces of Workflow/BPM, in order to understand the situation, I need to see the whole picture.
    But in this situation, the syntax is correct and it looks like everything will work correctly. If you have any problems with this Workflow, I will be happy to help you.

  • Jakub Grufik
    replied
    Hello lazovic I have a quick question, please.

    It is connected with the workflow we were discussing above.

    When I am updating relatedRecord - Assigned User in my workflow and filling it with value from targetRecord I am using special syntax you sent me "workflow\targetEntity\attribute('amountConverted') "

    Now, in the same workflow, I would like to check IF "state" in relatedEntity contact equals something. Is this the correct format please? (screen1)

    Please keep in mind that this is exactly the same workflow where I am updating relatedRecord assigned user, but I am targeting opportunity where is another relatedEntity contact and I want to get contact.addressState while updating assigned user Hope it makes sense.

    Thanks a lot
    Attached Files

    Leave a comment:


  • Jakub Grufik
    commented on 's reply
    Thanks a lot for the docs!

  • Jakub Grufik
    commented on 's reply
    okay I found it somehow https://docs.espocrm.com/administrat...ntityattribute but it is pretty hard to find tbh nevermind, thanks again

  • lazovic
    commented on 's reply
    Always glad to help you!

    You can learn more about working with Workflows and Formulas in these documentation articles:
    https://docs.espocrm.com/administration/workflows/,
    https://docs.espocrm.com/administration/formula/.

    The formula I sent you is described here:
    https://docs.espocrm.com/administrat...ula-in-actions.

  • Jakub Grufik
    replied
    Hey lazovic!

    Holy sht(sorry for that) it is actually working exactly as I wanted!

    Man thanks a lot, you saved my ass again and definitely not for the last time.

    Is there by any chance documentation for those syntaxes? I was not able to find this one in espoDocs.

    Thanks a lot again buddy! I owe you

    Leave a comment:


  • lazovic
    replied
    Hi Jakub Grufik,

    Please use this formula:

    workflow\targetEntity\attribute('amountConverted') ;

    Leave a comment:


  • Workflow - access targetRecord attribute when updating relatedRecord attribute

    Hello guys,

    I am currently facing issues with one of my workflow, where I am targeting opportunities, but I would like to update the related record "Assigned User".

    Everything seems to be working fine except that I am trying to assign the value from targetRecord attribute(oportunity.amountConverted) to relatedRecord attribute(assignedUser.obrat).

    Syntax entity\attribute('amountConverted') seems to be taking value from the entity I am trying to update, not from the entity I am targeting with the workflow.

    Is there any other syntax how to access targetEntity attribute when updating relatedEntity attribute?

    Hopefully, it is clear what I am trying to achieve (screen1, screen2)

    ​Thanks a lot for the help!
    Attached Files
Working...
X