Custom ID got reset

Hello,

I was troubleshooting an email connection issue and saw that the site was using Gravity Forms and noticed it wasn’t using Gravity SMTP. I switched it and didn’t think there would be an impact on the enty ID. Could it cause the change with entry ID? Markup Hero - Free Screenshot & Annotation Tool

From searching, it’s not possible. Mail delivery is separate from form: Markup Hero - Free Screenshot & Annotation Tool

We need the ID back to previous sequence. Any suggestions?

Thank you,
Samantha

The entry ID is automatically set by your site database when the row is inserted by WordPress. You’ll need to check the auto increment setting for the gf_entry table in your site database. If you do change the value, you’ll need to ensure it is unique, there can’t already be a record in the table with that value or a database error will occur on insert.

Checking.

What could’ve caused it to reset? Was it possible from changing out the SMTP plugins?

Thank you,
Samantha

Changing SMTP plugins would not change the database auto increment settings. Issues like this are usually caused by bad/incomplete database migrations or backup restores.

1 Like

To be clear, it’s not Gravity Forms’ Entry Id, it’s an ID we created for RMAs.

Edit: What could’ve happened to cause a reset and how can we fix it to get back to where it skipped?

This is the code:

function mru_rma_id()
global $wpdb;
$init_ value = 10000;
$latest_post_id = $wpdb->get_var ("SELECT ID FROM $wpdb-›posts WHERE post_type = 'mru-rma' AND post_status = 'publish' OR post_status = 'pending' ORDER BY ID DESC LIMIT 1");
$latest_rma_id = get_post_meta( intval($latest_post_id), "rma_id", true );
$rma_id = intval($latest_rma_id) + 1;
return $rma_id;
}```


Thank you,
Samantha

This issue has been fixed.