Workflow -> Create Record and its ID is not existing within the action?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jakub Grufik
    Senior Member
    • Aug 2022
    • 361

    Workflow -> Create Record and its ID is not existing within the action?

    Hello guys, in one of our workflows I am using the action Created Record -> Opportunity

    I am setting some fields which is working fine and at the bottom there is a place for the formula. I am trying to use ID of the new record I am creating and use it in the function to update some other record. The problem is that when I use "id" it returns null and the updated record where I am using this "id" is null as well because of that.

    Is it because ID does not exist during the creation of the record via workflow yet?

    Is there any way to get the ID of the new record within the same action?

    I tried entity\attribute("id") as well as just "id" as you can see on the screens.

    Hopefully, it is understandable what I am trying to achieve

    Thanks a lot for the help
    Attached Files
  • rabii
    Active Community Member
    • Jun 2016
    • 1250

    #2
    Originally posted by Jakub Grufik
    Hello guys, in one of our workflows I am using the action Created Record -> Opportunity

    I am setting some fields which is working fine and at the bottom there is a place for the formula. I am trying to use ID of the new record I am creating and use it in the function to update some other record. The problem is that when I use "id" it returns null and the updated record where I am using this "id" is null as well because of that.

    Is it because ID does not exist during the creation of the record via workflow yet?

    Is there any way to get the ID of the new record within the same action?

    I tried entity\attribute("id") as well as just "id" as you can see on the screens.

    Hopefully, it is understandable what I am trying to achieve

    Thanks a lot for the help
    The id is not yet generated, best way is to add another action > update record Or a script task and then use the same code but you have to get the createdId using record/findOne.
    Rabii
    Web Dev

    Comment


    • Jakub Grufik
      Jakub Grufik commented
      Editing a comment
      Hello, yep thats what I thought. Thank you for the confirmation mate. Appreciate it.
Working...