Formula works in sandbox but not in the workflow

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Russ
    Senior Member
    • Feb 2022
    • 423

    Formula works in sandbox but not in the workflow

    Hi!
    When trying the formula in the sandbox I have a proper result however when workflow fires, result is not the
    If someone can give me a hint, I would appreciate it, thanks!
    Attached Files
  • Vadym
    Super Moderator
    • Jun 2021
    • 345

    #2
    Hi Russ,

    Do you inserted Formula to Execute Formula Script action or Conditions?
    Click image for larger version

Name:	image.png
Views:	270
Size:	61.8 KB
ID:	95595Click image for larger version

Name:	image.png
Views:	251
Size:	58.0 KB
ID:	95596

    In my case, works smoothly:
    Click image for larger version

Name:	image.png
Views:	262
Size:	49.0 KB
ID:	95597​​​

    Comment

    • Russ
      Senior Member
      • Feb 2022
      • 423

      #3
      Originally posted by Vadym
      Hi Russ,

      Do you inserted Formula to Execute Formula Script action or Conditions?
      Click image for larger version

Name:	image.png
Views:	270
Size:	61.8 KB
ID:	95595Click image for larger version

Name:	image.png
Views:	251
Size:	58.0 KB
ID:	95596

      In my case, works smoothly:
      Click image for larger version

Name:	image.png
Views:	262
Size:	49.0 KB
ID:	95597​​​
      Hi, in actions, create related entity
      Attached Files

      Comment


      • rabii
        rabii commented
        Editing a comment
        you need to use workflow\targetEntity\attribute('serviceType') when you are on create related entity
    • yuri
      Member
      • Mar 2014
      • 8440

      #4
      Because the formula context entity is switched to the related record that is being created. See https://docs.espocrm.com/administrat...mula-functions
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • Russ
        Senior Member
        • Feb 2022
        • 423

        #5
        Originally posted by yuri
        Because the formula context entity is switched to the related record that is being created. See https://docs.espocrm.com/administrat...mula-functions
        thanks

        Comment

        Working...