Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

programmatic way to check which version is installed?

Is there a way through javascript to see what version (or rollup) the crm organization/server is on? What I really want to know is if I am on UR11 or before.

I've tried:

  1. Xrm.Page.context - but nothing about versions (did I miss something?)
  2. Checking if (crmForm == null) (Since that was disabled as of UR12) The problem is that if the org enables HTC support then crmForm will not be null, and I need to know what version with or without HTC support enabled.

What I've done for now is put the onus on the solution installer to modify a javascript file that has the "isRollup12" variable to true or false, which is quite clunky.

like image 693
BenPatterson1 Avatar asked Feb 12 '26 23:02

BenPatterson1


2 Answers

There is a global JS variable you could check:

alert(APPLICATION_FULL_VERSION);
//on UR12 '5.0.9690.3236'
//on UR11 '5.0.9690.2839'
//and so on...

But this method isn't supported, so use at your own risk.

like image 74
Raphael Moser Avatar answered Feb 15 '26 14:02

Raphael Moser


you can check if the getClientUrl function is defined, it's a new function included inside UR12.

var isRollup12 = false;
if (Xrm.Page.context.getClientUrl !== undefined) {
   isRollup12 = true;
}
like image 22
Guido Preite Avatar answered Feb 15 '26 13:02

Guido Preite



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!