Notifications
Announcements
No record found.
I have added a custom button that behaves quite nicely on the Lead home page. I also have the same button defined for sub-grids. The button appears on Advanced Find according to the specified Enable Rule. However the button does not respond when clicked. Looking in F12, the JavaScript library is not loaded.
The library exists and is properly specified in Ribbon Workbench. Published. Re-published. Cleared cache. No luck.
What am I missing?
Can you please try once by adding "debugger" in your function. ?
Hi,
The custom button which you have created is specific to lead entity and also to application ribbon which appears globally. Enable rule has been implemented in application ribbon to display the button based on some condition?
Can you please check parameter once because parameter differs for home, subgrid, form and application ribbon.
Make sure to look into developer tools for any issues.
If nothing works, put some alert or write something to console log.
Regards,
Prakash
Thank you @Pravin for the suggestion. I am having mixed results. The button/script still work fine from the home page and I can confirm the debugger statement is in the Library. It does not change the behavior on the Advanced Find page. I launched F12 from the Advanced find, "empty cache and hard refresh". I am seeing the JavaScript library for the Leads (leads.js) but not for Contacts (contacts.js). I am adding the similar buttons to both entities... oops, I mean tables (LOL).
This does give me some additional things to look at. I'll debug a bit more today and see what I find.
regards,
clint
Thanks @Prakesh for the suggestions. There is an enable rule which behaves properly. When 2 rows are selected on the Advanced Find page, the button is enabled as expected.
The Command for the SubGrid is defined differently than the Command for the Home Page as the integer parameter varies between the two. I am not sure what else you are suggesting I check. Let me know
I am actually seeing the Lead JavaScript library. I have the same test/issue going on with Contacts, so I think the issue is elsewhere. I will debug a bit more today and see what I come up with.
thanks,clint
Ok, the code IS running after all. It appears a copy of my code (mc_person.js) gets copied else where (VM54231 in this case) at run time and is executing there. Break points set in mc_Person.js do nothing; debugger statements do work. I have not noticed this when debugging JavaScript before.
The other issue seems to be that Xrm.Navigation.navigateTo does not work on the Advanced Find sub-grid even though it works on sub-grids on a form and the Home Page.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 70 Super User 2025 Season 2
Gerardo RenterÃa Ga... 33 Most Valuable Professional
Daniyal Khaleel 32 Most Valuable Professional