get selected items of relation on button code of parent item

hi i want to get selected items id on parent item form button i create one button on itemtype-part i create relationship of part item with document item i want to select 2-4 document from relationship and done action on it using code written on button of Part item form but i not know how to get ids of selected item
Parents Reply Children
No Data