Functionality same as in BOM > Routing selected automatically the Operations table filled

I want the same functionality in my custom doctype