Support Article
Unable to save or update using data types
SA-69187
Summary
When opening a data type instance in an activity using the Obj-Open-By-Handle and saving the page list instance using the Obj-Save method, the changes do not reflect in the data type record.
Error Messages
Cannot save a page with an instance of class; it is read-only
Steps to Reproduce
- Create a data type with a local storage.
- Source the page list to the repeating grid.
- Add a button to call the activity to update the record.
- Open the data type instance using the Obj-Open-By-Handle method in an activity.
- Modify the Clipboard page using the Property-Set method.
- Call the Obj-Save method. Changes are not reflected in the the data type record post update.
Root Cause
The records were updated in the data type using a Page List. This was implemented incorrectly.
Resolution
Perform the following local-change in the activity rule:
- Load the data page list using the Load-DataPage method.
- Iterate the page list results for each embedded page of data type class.
- Open the object using Obj-Open method with Lock and ReleaseOnCommit options enabled in the Clipboard page in the Step page.
- Set the property values that are updated to the Clipboard page in the Step page.
- Call the Obj-Save on the Clipboard page in the Step page.
- Perform a Commit operation which must be outside the Step 2 iteration.
- Reload the page list in to Clipboard to reflect the changes made.
Tags:
Published December 28, 2018 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.