On action states change

Function used for action state change at the record level.