I have been dealing with such cases in my official capacity. Moreover, I also changed Govt. jobs during my youth (from Railways to other Central Govt. jobs to finally Central Secretariat). In every case, I applied through proper channel with NOC. In most of the cases, I sent advanced copy while applying. Later my office forwarded the application or NOC. This helped to me include my past service for the purpose of pensionary benefits.
A candidate must give it in writing to his/her parent office that he/she is applying for a new Govt. job with copy of advertisement. He/She must also request for NOC. He/She must keep the copy of advertisement with him/her along with the receipt as proof. In this way, even if he does not get NOC, in case of selection in a new post, there will be no problem in relieving and inclusion of past service.
Another point is required to be remembered in this regard. If the person has to sign a bond in case of paid training (as for example, in case of Trainee ASMs or Trainee Traffic Inspectors in Railways), the bond gets transferred to the new Department in case of selection.
Non-violence is the greatest Dharma; So too is all righteous violence.