I created a form Cheque Transaction. Which is get data from Purchase Invoice or Sales Invoice. Cheque Transaction amount will paid from journal entry. After Journal Entry submitted, I cannot cancel Cheque Transaction. I cancelled reference Journal Entry, but still showing message Cannot delete or cancel because linked with GL Entry.
With custom doctype like this, you’ll need to unlink the reference to that journal entry using the controller hook before_submit(). I think you’ll need to set the GL Entry field in your check transaction to allow on submit, but readonly. That’ll allow you to unlink.
Also depends where you link actually, either you have a link to that cheque transaction in the GL Entry or you have a link to the GL Entry in the cheque transaction doctype.