Based on the information you provided and according to my interruption of AR 350-1, if the test was specified as a For Record test it must count. As an exception to this statement, if the test was administered outside the guidance of the command’s policy they could determine the test does not count. For example, local policy could demand that only certain trained/certified individuals may administer the APFT for the sake of maintaining Army Standards. If you were given the test by someone who was not certified then yes, the command could void the test.
I would encourage you to sit down and calmly speak with your chain of command in a professional manner to determine why they believe the test should be voided. If they decide to void the test you must then ask yourself another series of questions. Is this worth fighting over or is it simpler to just to take another For Record APFT? If there is a difference of professional opinion it may be better to let it go. Did you take the test in accordance with Unit requirements?