Code Fix: Deleted SmartObject properties results in duplicate fields when another property is renamed with the deleted property’s name
KB001815
PRODUCTIssue Description
When deleting a SmartObject property and renaming another property in the same SmartObject to the name of the deleted property, an error occurs when creating a package which includes the SmartObject.
Error Message
A property with the same name and namespace already exists in the model. name = 'Guid' and namespace 'urn:SourceCode/SmartForms/View?CustomerInfo-IV#Sources.88c48b3c-424b-4574-8327-8502af984a0e/Fields.Service Location.
Cause
The deleted property caused duplicate fields in the XML.
Repro Steps
- Create a SmartObject.
- Create an associated SmartObject.
- Create a view from the first SmartObject.
- Delete the Drop-Down control.
- Add a new Drop- Down control.
- Configure the data source to load the associated SmartObject.
- Then bind the control to the associated field.
- Edit the associated SmartObject.
- Add a property named Property2.
- Finish the SmartObject.
- Edit the view and finish.
- Edit the associated SmartObject.
- Add a property named Property3.
- Finish the SmartObject.
- Edit the associated SmartObject.
- Delete Property2.
- Modify Property3’s name to Property2.
- Edit the view and finish.
- Create a package, an error occurs.
Resolution
- Ensure you have K2 4.7 installed.
- Install the K2 4.7 February 2017 Cumulative Update.
- Get the K2 4.7 February 2017 Cumulative Update FP2 from Regional Support.
- Install the K2 4.7 February 2017 Cumulative Update FP2 to apply the fix.