Search code examples
javascriptdynamics-crmdynamics-crm-2016dynamics-365

Dynamics crm opening assign window


In a javascript function, I want to open the window that is usually opened when the user clicks on the "Assign" button in the lead form.

In the ribbon workbench, I see that the function that is called on the click of Assign is XrmCore.Commands.Assign.assignObjectLegacy, in the library Main_system_library.js.

Is it possible to call this function in javascript?


Solution

  • Doing such things like using internal libraries, calling internal methods are unsupported in Dynamics CRM. Future version of product changes may affect this implementation.

    Instead, try to use jQuery to find the button element & invoke the onclick event like $('#assignbuttonid').click(). This is too unsupported because we cannot use DOM manipulation but somewhat ok.

    Otherwise I don’t see any alternate supported solution to do this.