locked
CRM 2013 Use JavaScript on Main.aspx at list level RRS feed

  • Question

  • CRM 2013 Entity forms have the ability to inject the javascript for specific events for specific Elements and stuff like that using In built form load capabilities. I mean we can load the JS file  on form load events for Entity Forms.

    Does Main.aspx page where we have Account records list or Contact record list or Lead record list, has any capability to inject the JavaScript?? may be supported or unsupported way?? 

    I mean How can I load the JS file on Main.ASPX form load events??

    Please assist.


    Tuesday, June 10, 2014 5:16 PM

Answers

  • You could do the following to inject javascript:

    1) Create a javascript library with the function in it you want to run.

    2) Modify the home ribbon and customize a button that's on that page (Edit for instance). 

    3) Add an enable rule that runs the function from your javascript library. Make sure it returns true so the button appears.

    Any additional code in that function will run. You can also use Xrm.Page to grab what entity you are on, so it performs code where you want it to.

    • Marked as answer by Nicksoft2011 Friday, June 20, 2014 10:03 PM
    Thursday, June 12, 2014 4:49 PM

All replies

  • Any assistance on this scenario?? 
    Thursday, June 12, 2014 2:06 PM
  • You could do the following to inject javascript:

    1) Create a javascript library with the function in it you want to run.

    2) Modify the home ribbon and customize a button that's on that page (Edit for instance). 

    3) Add an enable rule that runs the function from your javascript library. Make sure it returns true so the button appears.

    Any additional code in that function will run. You can also use Xrm.Page to grab what entity you are on, so it performs code where you want it to.

    • Marked as answer by Nicksoft2011 Friday, June 20, 2014 10:03 PM
    Thursday, June 12, 2014 4:49 PM