Write Records Smart Service Keeps Creating New Record Instead of Updating

I'm new to appian and I’m trying to update specific fields (status and step) of a record in my Process Model using the Write Records Smart Service, but instead of updating, it keeps creating a new record.

What I’m Doing:

  1. I pass the record to a form where the user can approve or reject it.
  2. When the button is pressed, I update the status and step values using a!save().
  3. I then pass ac!record to pv!record.
  4. Finally, I use the Write Records Smart Service to save the changes.

Issue: Instead of updating the existing record, the Write Records node creates a new record.

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer

    check the primary key field is populated prior to hitting the node, also make sure the record type output goes back to your pv so you can see the data on the way back out as well. Sometimes, adding a user task node inbetween nodes where data is being transformed and then written can help you see the journey the data type goes through. Within the History tab of the process though you should be able to see everything.

Reply
  • +1
    Certified Lead Developer

    check the primary key field is populated prior to hitting the node, also make sure the record type output goes back to your pv so you can see the data on the way back out as well. Sometimes, adding a user task node inbetween nodes where data is being transformed and then written can help you see the journey the data type goes through. Within the History tab of the process though you should be able to see everything.

Children
No Data