1
votes

I have a custom activity entity named "slfn_technischonderhoud" which is setup not to appear in activity menus. I have one record of this in my development environment. whenever I try to open this record from the main.aspx grid, it redirects me to the "new record" form. this only happens when opening it from the main.aspx grid. When opening it from an embedded subgrid on a related entity, it opens the right record.

I do have a Javascript function which does exactly this (open the "new record" form in a new window). Is there a way that this function somehow got assigned to the doubleclick event on the main.aspx grid? and is there a way to unbind this?

1

1 Answers

-2
votes

Did you try to create a web resource and add it to the custom entity form and use the javascript and Jquery this way:

$( document ).ready(function() {
  // Insert your code here to add the event to the main.aspx grid.
  // This code will be loaded outside the form i suppose.
});

Note: This strategy is not supported from Microsoft Dynamics CRM. So i would suggest you to use the OnLoad Form Event with a subgrid.

You can unbind that by removing the onClick Event or supress them this way:

/*Normal Browser:*/ event.stopPropagation();

/*For IE:*/ window.event.cancelBubble = true;