Hi,
We need check the js code run on UCI or not. Please help me a supported js code for check.
Thanks,
*This post is locked for comments
Hi,
We need check the js code run on UCI or not. Please help me a supported js code for check.
Thanks,
*This post is locked for comments
Xrm.Internal.isUci() do the job for me. Ty Andrew Butenko !
Hello,
It's a bit unsupported but works fine and used with Microsoft - Xrm.Internal.isUci() when executed from Classic UI returns false and true when executed from UCI.
We are using the below snippet to identify is it UCI or not.
function isUCI(){ var globalContext = Xrm.Utility.getGlobalContext(); var t1 = globalContext.getCurrentAppUrl(); var t2 = globalContext.getClientUrl(); if (t1 !== t2) return true;
return false; }
Hi,
I've had the same problem and I opted to use the follow script
var globalContext = Xrm.Utility.getGlobalContext();
globalContext.getCurrentAppProperties().then(successCallback, errorCallback);
I dont know if it is a correct way, but i works for me.
Saludos
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
52
dkrishna
6