I'm trying to update the ID of an existing OptionValue using API v4. I get "Cannot update the id of an existing OptionValue" error. Is there another way to do that?
As said by Jitendra, you cannot update the id via CiviCRM api. The id in civicrm tables are autoincremented and are referenced at many places. If you still want to take risk than you can run a sql query in mysql to update the id of required row in civicrm_option_value table.
id
is an autoincremented value in DB which should be set by DB itself. Updating the id directly in such a way is not a very good idea. Can you let us know what you are trying to achieve? – jitendra - fuzion Dec 13 '19 at 9:12