Support Article
Error changing property type
SA-6728
Summary
Attempting to change a property type returns a ruleform error message, and the property type is not changed.
Error Messages
This record has 2 errors
Definition required to conform to <CLASS NAME>.<PROPERTY NAME> instance created <DATE> GMT.
Data type: The String Type value <TYPE> has been changed to Text
In some configurations e.g. if Checkout / Checkin functionality is not being used, then the first error may not occur and only the second "Data Type" error will appear in the ruleform.
Steps to Reproduce
1. Create a new property, save it with type text
2. Check-out -> change mode to TrueFalse
Root Cause
This is the expected behaviour. It is not possible in Pega 7 to change the Property Type once the property has been created and saved.
The type of a property effects the way that assembled code is generated to access and change those properties values. In the past we have seen the large impacts of changing common properties that are used in many areas in the system.
Resolution
In Pega 7 it is not currently possible to change a property type once the property has been saved.
In the case that the property is new and the property type has been set incorrectly by accident the property should be deleted and recreated with the correct property type.
Further guidance can be seen in the following PRPC v5 PDN article.
https://pdn.pega.com/data-management/how-to-change-the-type-of-a-property-rule-in-a-higher-ruleset-version
Changing a property type (in versions where this is possible) should be considered carefully as it has implications accross a system.
- If the property is exposed and has a database column of a specific type.
- The property is not new and is already used by existing work objects.
- Activities or custom functionality may be using the property and expecting a particular type.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.