(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?
(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.
If you are using P6 standalone, you cannot locked the activity id. If you are using the Professional enterprise or EPPM version and you have admin right, you can change the users Project security profile not to have priviledge editing the Activity ID.