Without knowing what you're trying to do, I can think of a few solutions.
Replicate the custom status behavior with a hidden checkbox that gets triggered by whatever is currently setting your custom inventory status.
Have a client script that displays a message that tells the user it can't do that, then change it back.
Hide the actual status field and make a custom status field in the UI that only displays the statuses you want the user to be able to select, disabling it if it's that custom status.