File renaming to PartNo from Data Card

Which would be the best way of having PDM rename the part or assembly file in SolidWorks to the PartNo from the Data Card?

Our data card generate a part number for us but we have to manually change the part file or assembly file to that partno. We are trying to have PDM rename the part and assembly automatic after submitting for check or when checked in. This way it keeps it's references.

SolidworksSolidworks Pdm/enterprise Pdm