Forum Discussion

Sathish's avatar
Sathish
Ideator I
2 years ago

Update Sequence property to existing records

After adding a new sequence property to an existing item type, how can i update the value for existing records in database?

It tried to update using server method

[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:a046bcb8-1830-4737-a890-1531a047694f:type=csharp&text=string%20nextSequence%3D%20inn.getNextSequence%28%22newSequence%22%29%3B%0AItem%20editSelectionSet%20%3D%20inn.newItem%28%22myItemtype%22%2C%20%22edit%22%29%3B%0AeditSelectionSet.setID%28thisSelectionSet.getID%28%29%29%3B%20%2F%2Flooping%20all%20records%20here%20to%20get%20current%20row%20id%0AeditSelectionSet.setProperty%28%22my_sequence%22%2C%20nextSequence%29%3B%0AeditSelectionSet%20%3D%20editSelectionSet.apply%28%29%3B]

3 Replies

  • If your property is already defined as a Sequence Property you cannot update it - it is handled by Aras. In order for you to change its value, the property needs to be a string property and your code should work perfectly then

    • AngelaIp's avatar
      AngelaIp
      Ideator I

      Good catch Eva, I guess this was the solution!

  • Do you get an error message? There is nothing obvious wrong in your code. Does your ID property contain the correct id?