actually i'm creating a component in which i'm facing problem to restrict a backend user from direct edit a record.
I Know When we Edit a record in joomla using "controller.edit" function it uses HoldEditId() function to store the current id in userstate passed using url
i'm using the value stored using HoldEditId () function in model to check if the id of url is the same stored in userState Variable To Load Correct record data
But HoldEditId not only hold the current value but also hold the last edited record id now the problem is how can i know which is currently stored id and which is last inserted id
so the solution is to remove the old values save using holdeditid function, when a user click on close or cancel button but how can i do that and if this is right or i'm doing very wrong there is an another simple way.?