Show a doctype link based on other selected doctype Id

I’ve created a doctype where I’ve selected the Employee and added one more field which is also a link field. I want to show only Employee Id related doctype Id in next field.

In this above screenshot I want to show only Employee ID related doctype ID in Salary Field. For example I’ve selected JSG-1007 in the Employee field and want to show only JSG-1007 in Salary field.

you can use below client script

frappe.ui.form.on("Doctype", {
  setup: function(frm) {
      frm.set_query('salary_slip', function() {
          return {
              filters: {
                  "employee": frm.doc.employee
              }
          };
      });
  }
});

Thankyou so much for your quick response. This solution is working for me.