I have a criminal record for affray from when I was 18 years old. Will this bar me from entering the legal profession?

A previous conviction is not necessarily a bar to becoming a solicitor or barrister but may well be taken into account when deciding whether youre suitable to be admitted as a student member of the Law Society (as you would need to do before starting the LPC) or when joining an Inns of Court (as you would need to do before starting the BVC.) You would certainly need to declare your conviction with each individual case looked at on its own merits. I would advise you to write seeking guidance from either the Solicitors Regulation Authority or Bar Standards Board at the earliest opportunity, giving full details of the circumstances of the conviction and the sentence passed. If you can show that a significant amount of time has elapsed since the conviction and that you are now a person of good character, this may convince the relevant authority that you are fit to be admitted.