-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe
Currently when a seed value is changed there is no check to see if the new seed value is lower than the old seed value. Because auto-number attributes do not enforce unique values, this runs the risk of duplicate values if an auto-number seed is set lower than the previous value.
Describe the solution you'd like
- Logic that checks if the desired seed value is lower than what is in the current environment and prevents the seed being set and outputs a warning/error to the log file.
- This will require a query for the last created record that uses the auto-number attribute
- An optional boolean parameter for the ImportConfig.xml called
forceseedsettingthat can be used to override the logic- Information should be logged to indicate when the seed has been set because of an override
- Tests to validate the logic and that the values have not been changed in the target environment unless the
forceseedsettingparameter is provided.
Additional context
The auto-number manager tool from XRM Toolbox has logic that can query and parse the current auto-number value: https://github.com/rappen/AutoNumManager/blob/16a19098465a454f98db28b96316f538497ca1cd/AutoNumMgr.cs#L479
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request