web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Ribbon Workbench - JavaScript Library out of scope on Advanced Find

(0) ShareShare
ReportReport
Posted on by 1,031

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.

pastedimage1608565484081v1.png

What am I missing? 

I have the same question (0)
  • Pawar Pravin  Profile Picture
    5,237 on at

    Can you please try once by adding "debugger" in your function. ?

  • Prakash Kalimuthu Profile Picture
    on at

    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

  • Clint Woods Profile Picture
    1,031 on at

    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

  • Clint Woods Profile Picture
    1,031 on at

    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.

    pastedimage1608647181462v1.png

    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

    pastedimage1608647331779v2.png

    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

  • Suggested answer
    Clint Woods Profile Picture
    1,031 on at

    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.  

    pastedimage1611247689237v1.png 

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 33 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans