2
votes

I faced with next problem in MS crm 2011: how can I block the pop-up window of Contract Template Explorer via JavaScript when user clicked on the contract item in the pane left menu via right mouse button and select the new item.

enter image description here

I cannot change user rights, so this variant is out. Same problem with the ribbon "New" button of the Contract entity was solved by creating custom "New" button and selecting by script default contract template. Please help me! I will be very grateful for your help.

1
You might be able to do by editing the sitemap...Ollie
Dear @Ollie, unfortunately, I do not have access to it...Ihor

1 Answers

0
votes

First of all what you are looking to do is pretty far outside what is a supported customization. The supported method would be to leave the menu item as it is, and disable the users ability to create new contacts through security or by modifying the form.

That being said, if you are still interested in how it could be done, you can accomplish it with a ribbon modification.

  1. You first need to create a custom button.
  2. Create an enable rule that will run javascript in a custom web resource.
  3. Deactivate the button
  4. Have your custom javascript web resource select an element with a title of "Create a new record" and then disable or remove it in the DOM.

There is a good article on the basic principles at this link

http://mscrmtools.blogspot.com/2012/01/how-to-colorize-grid-rows.html

It uses the method to colorize the results of a list view, but once you've been able to execute a custom library on the page you can do whatever you want.

Stressing one more time that this isn't supported.