Duplicate button swaps ID with original record
Lets say I a have a record with a couple attributes:
```
{
name: "John Doe"',
address: "123 Main Street",
}
```
Zoho assigns this record a unique ID that is 19 digits long for example: 1810278000027362038
I call the API to download the data and it give me this:
```
{
name: "John Doe"',
address: "123 Main Street",
ID: 1810278000027362038
created_at: "2018-1-1 12:30:45"
modified_at: "2018-1-1 12:30:45"
}
```
Now I want to duplicate the record and change the address of the new record that is created. I select the record in the table and click on the "Duplicate" button.
This creates a new record for me, however the IDs of these two records have been swapped. Sounds crazy right?
I wrote a sync method to poll data changes on an interval of say an hour that retrieves all of the changes.
Below is a timeline of I was observed:
1. Create record
2. Poll and store the data locally
Result from the record creation:
```
{
name: "John Doe"',
address: "123 Main Street",
ID: 1810278000027362038
created_at: "2018-1-1 12:30:45"
modified_at: "2018-1-1 12:30:45"
}
```
3. Duplicate the record and change address of the new record to "456 Main Street"
4. Poll for all records
I get an array with 2 records:
```
[
{
name: "John Doe"',
address: "123 Main Street",
ID: 1810278000027362039
created_at: "2018-1-1 12:30:45"
modified_at: "2018-1-1 12:30:45"
},
{
name: "John Doe"',
address: "456 Main Street",
ID: 1810278000027362038
created_at: "2018-1-1 12:36:45"
modified_at: "2018-1-1 12:36:45"
}
]
```
Notice how the original records dates have not changed, but the ID is different.
Now look at the duplicated record. It has the ID of the original record, the dates of a new record, and the "address" change that was made.
This is a HUGE problem for keeping the data consistent. I can no longer reference the ID as the unique identifier for a record.