Skip to main content
sarathkumr268295
April 8, 2024
Question

Updating records not working

  • April 8, 2024
  • 15 replies
  • 0 views

Hi all,
We are using record type PVs in our process model and passing the same to user input task. In the task, we are updating the values and after submit is clicked, we are updating the variables to database using write to records smart service. But when we are doing the same, the values are getting updated in pv level, but not getting updated in database. All configurations are correct inside the process model. Not sure what is the gap in this? Please provide your insights.

15 replies

shubhama926776
April 8, 2024

I think you are  updating PVs in a user task but they aren't saving to the database.

Verify below expected scenario:-
Updating a copy of the PVs instead of the originals.
Data mapping issues in Write to Records smart service.

sarathkumr268295
April 8, 2024

We tried updating the copy, the pv is updated
but db is not

When we updated value in script task, at that time, db was getting updated

venkatrea696188
April 8, 2024
When we updated value in script task, at that time, db was getting updated

What's this i don't get it?What you are doing in script task using a!writerecords() ??

karumurua531442
April 8, 2024

hi [mention:b08a9915dde2428e9c6dfef8cba0cdd6:e9ed411860ed4f2ba0265705b8793d05] This might have couple of reasons, are you getting any errors? can you show me how are you updating the variables, snapshot of your code might help

sarathkumr268295
April 8, 2024

I am not getting any errors. Everything is fine

venkatrea696188
April 8, 2024

That's odd, try it again. Have you checked logs??

AFAIK may be one of the following scenario may lead to it 

1. There isn't anything that overwriting?

2. It's not getting updated in DB or Record(Sync issue)??

3. Write records is successful(Without any errors)?

4. Mappings of variables done properly?? (ACP to Pv)

sarathkumr268295
April 8, 2024

We havent checked the logs.
There is no overriding happening.
DB is not updating.
No error as well and all variables are mapped properly.

August 6, 2024

I had the same. To force the update, I splitted the script into 2 scripts. One to fill the object and the scond one to update the same object. Then my WriteRecordType works finally.