Shaving Is a Bad Idea
There is some old wisdom for this one. For every month you've invested in growing your glorious beard, you should wait that many days before shaving. I think it's sound advice. If you've grown a long term beard, at least give it a week! There are some other options to consider first though.
I never want to hear about anyone shaving off their man card. But worse than hearing about someone shaving, is hearing about someone not even giving their beard a chance to fully grow in before they decide to shave. If this is you, make sure you've given yourself at least three months. Any less than that and you don't even know what your beard is truly capable of. But worse than that, it may not even be up to you.
Sometimes a job simply requires it. Maybe you can convince your boss(current/future) that it's important to you. Try to explain that beards are becoming more and more acceptable in the professional environment. That instead of a clean shave, a shorter shave may be sufficient. Something that can be maintained easily, look professional/clean, and still let's you maintain a masterful beard that you love.
The last suggestion is to give the appearance of conceding. Shave it off, and then slowly let it grow in keeping short and manicured. Maybe you can slide it past "the man" and take back control of your face. Of course, this is power play and your mileage may vary. It will take strict discipline to keep yourself even more meticulously well manicured than even before. Make them second guess the need to impose the company dress code on such a well out together member of the team.
However, if it must come to pass that you must shave, shoot me a message and I will send you a video of me pouring two fingers of whiskey in honor of the fallen follicles.