Can my previous employer restrict me to join non-direct customer who is using our software?

Hi, Just a couple of moths before I have relieve from my previous empoyer (X) & joined a new employer (Y) who is just using our software (ERP) for their business process. I worked as a software developer in X for 5 years & joined Y as an Assistant Manager. While relieving from X, they are forcefully asking me to show them offer letter of Y & said that it's our exit policy, without this I will not get relieving documents. There is no where mentined such exit policy but still X is harrasing their employee while leaving company. As I have worked in X more than 5 years, I have to have my proper relieving documents for my future perspective, I showed them employer Y offer letter. Now they are forcing me to not join Y as they are using their ERP & threaten me I have signed bond while joining X. I have checked NDA which I signed & their is nowhere mentioned that I cannot join employer who using their ERP. Can I send legal notice to X for all these matter to get required documents?