Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions crm/lead_syncing/doctype/lead_sync_source/lead_sync_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,14 @@ frappe.ui.form.on("Lead Sync Source", {
});
});
},
// added a filter to show form only linked to pages
facebook_page(frm) {
Comment on lines +12 to +13
Copy link
Collaborator

@NagariaHussain NagariaHussain Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add an early exit if frm.doc.facebook_page is empty/falsy. What happens when we clear the Facebook page field and then input in the form field?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix

frm.set_query("facebook_lead_form", function () {
return {
filters: {
"page": frm.doc.facebook_page
}
};
});
},
});