Search code examples
javascriptdynamics-crmdynamics-365

Run JavaScript from Dialog window in dynamics CRM


i want to know if it is possible to run JavaScript from a standard Dialog Form in dynamics CRM. enter image description here


Solution

  • Do you want to run your javascript only via dialog or your end goal is to run javascript on change of Status Reason field.

    If your end goal is on change of Status Reason, Why not register your trigger on change of Status Reason field(provided status reason field) is available on Form.

    In this way you do not need to touch standard Dialog.

    But if you want Javascript to run on dialog itself, then your way is little challenging.

    You cannot customize standard dialog, In turn you will have to create new Ribbon button and add your custom dialog which will perform operation and run your Javascript as well.

    Take a look at docs from Microsoft, specifically xrm-navigation This has got dialogs, which you can use.