web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

My Custom button does not show up in UCI, however it is visible in Classic

(0) ShareShare
ReportReport
Posted on by 167

I have custom button which is visible in classic however i do not see in classic UCI.

I see enable rule have on js which does not trigger in UCI.

COuld you please let me know, what could be posssible issue that custom button does not show up in UCI.

Below is JS on Enable rule-

checkUserHasRoleViaConfig: function (configRecordKey, formContext, successCall, error) {
"use strict";
debugger;
try {
if (configRecordKey === null || configRecordKey === "") {
throw new Error("Configuration Settings Key Not Passed");
}
if (formContext === null || formContext === undefined) {
return;
}
var role = "";
var ascName = "";
var ascValue = "";
var roles = formContext.context.getUserRoles();
Xrm.WebApi.retrieveMultipleRecords("asc_configurationsettings", "?$select=asc_name,asc_valuetxt&$filter=asc_name eq '" + configRecordKey + "'").then(

function success(response) {
var asc_result = response;
ascName = asc_result.entities[0]["asc_name"];
ascValue = asc_result.entities[0]["asc_valuetxt"];
for (var i = 0; i < roles.length; i++) {
Xrm.WebApi.retrieveRecord("role", roles[i], "?$select=name").then(

function success(response) {
var result = response;
role = result["name"];
var securityRole = ascValue.split('|');
for (var j = 0; j < securityRole.length; j++) {
if (role === securityRole[j]) {
successCall(true);
//return true;
break;
}
}
},

function (error) {
formContext.Navigation.openAlertDialog(this.statusText);
});
successCall(false);
}
},

function (ex) {
//formContext.Navigation.openAlertDialog(ex.statusText);
});
}
catch (ex) {
console.log("Error at ASC.Common.Helper.checkUserHasRoleViaConfig function: " + ex.message + "|" + "Stack: " + ex.stack);
throw ex;
}
},

I have the same question (0)
  • Suggested answer
    Satish Tiwari - CRM Profile Picture
    on at
    RE: My Custom button does not show up in UCI, however it is visible in Classic

    Hello Shahzeb,

    You can explore this article - community.dynamics.com/.../how-to-fix-ribbon-button-issues-in-unified-client-interface-uci and see if it helps.

  • Verified answer
    Shahzeb Khan Profile Picture
    167 on at
    RE: My Custom button does not show up in UCI, however it is visible in Classic

    it wasn't triggering because enable rule before it was not satisfying the condition, hence it resolved

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 125

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 101 Super User 2025 Season 2

#3
Erin Lubben Profile Picture

Erin Lubben 57

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans