Default filter enable or limited access to user for that doctype

I have created a doctype ABC and only two users have the permission to create and edit in that doctype. Is there any way that both the users can only see and modify only those docs which are created by him. Like in list view, User 1 can see only his enteries and User 2 can see only his enteries (like we do filter on list view)

Solved. I used a field in doctype and stored the current session’s user in a field. On the other doctype, that consisting of link field, I used this to check

frappe.ui.form.on(“Other Doctype”, “refresh”, function(frm) {
cur_frm.set_query(“select_draft”, function() {
return {
“filters”: {
“user_email”: frappe.session.user