Workflow: how to get id from previous "crreate related record" action

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dirk.dinger
    Junior Member
    • Nov 2018
    • 18

    Workflow: how to get id from previous "crreate related record" action

    Hello EspoCRM users,

    I have a workflow that creates an related entity and successfully links it to the target entity of the workflow.
    Now I want to add an HTTP action and would like to pass the Id of the related entity that has been created in the action before.
    What is the recommended way to obtain this id ?

    Kind regards,
    Dirk
  • dreginald
    Senior Member
    • Sep 2018
    • 103

    #2
    Write a Sequential Workflow to run after creation of the Related Entity.
    Action of this Sequential Workflow is to post the ID to a varchar field on the related target entity. (relationship between target entity and related entity is one to many or one to one)
    You can thereafter run the HTTP Action using the value of the varchar field on the target entity

    Comment

    • rabii
      Active Community Member
      • Jun 2016
      • 1259

      #3
      Originally posted by dirk.dinger
      Hello EspoCRM users,

      I have a workflow that creates an related entity and successfully links it to the target entity of the workflow.
      Now I want to add an HTTP action and would like to pass the Id of the related entity that has been created in the action before.
      What is the recommended way to obtain this id ?

      Kind regards,
      Dirk
      AKAIF there is such ability in BPMN using the formula below; however in workflow you can just get the id using a formula of the link fieldId of the linked resource. e.g accountId should get you the id since they were linked in previous action.

      Rabii
      Web Dev

      Comment

      Working...