Add custom logic/code
1. custom fields on sales order: Enable refundprocess, refunds transaction no#, error while creating refund
2. client script: on save function , context== edit
create refund for the lines marked as enable refund process field = true&& refund tran number == blank && error = =blank
Any error while creating refund, store it error
If required addmore layers of filters like provide user to check check box only when fulfilled qty is zero and billed qty non zero. and no refund tran number
Assumption: someone from business will check enable refund process check wheneverthey wants refund