Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Add id to url in CRM 4.0 rollup 21

$
0
0

Hello,

A few days ago, we upgrade CRM 4.0 from rollup 13 to rollup 21 in order to solve compatibility issues with IE9.

After the release, one of the customizations is not working properly anymore. This customization is in a custom entity, under custom actions. This button, links to an external website and the URL is include in the ISV.config file. In a different customization for the entity, we have the following javacript code that adds the ID of the object to the link.

if ( crmForm.FormType == 2)

    {

      var usage = document.getElementById('mnuNew_0_Custom Actions');

      if ( usage != null){

  var usagechild = usage.childNodes[0];

  var objectid = crmForm.ObjectId;

              var action = usagechild.getAttribute("action")

              var index1 = action.indexOf("https");

              var index2 = action.indexOf("',false");

              var url = action.substring(index1, index2);

              usagechild.setAttribute("action", "window.open('" + url + objectid.substring(1, 37) + "','usage', 'height=800,width=850,scrollbars=yes' );")

      }

     }

The code was working fine before the upgrade, but after, the id of the item is not added to the end of the URL. In our test enviroment, a previous rollup, is working just fine, which makes me think is a compatibility issue with the rollup.

Any idea how to update the code to make it work again?

Thank you.


Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>