This may not work if the system allows you to delete records.
It should take the highest value from the autoincrement+1 field. This will return a json with only 1 number.
You can get it with dictionary or lookup pairs Key.
Edit
Even so, if there are other users updating the database, this value may be “false”
So , from the beginning of the topic , I ask : What is the reason for the last record to be shown ? Does the system and user need it?