Manually Returning Sales Invoice and Linked Delivery Note in ERPNext

I am working on a process in ERPNext where, after manually returning a Sales Invoice and submitting it, I also want to return the corresponding Delivery Note linked via the custom field custom_delivery_note_id.

I want to proceed with the return process, which could involve marking the Delivery Note as “Returned” and performing related actions (like inventory adjustments).
Is this possible Please Help .

I need help with automating the process of returning the Delivery Note when the Sales Invoice is returned. Please Help