Hi,
In OpportunityPageV2 using custom code I'm checking the type of current user successfully.
initializeCustomCssOpportunityPageV2: function() {
var currentUser = Terrasoft.SysValue.CURRENT_USER.value;
var sysAdmins = "720b771c-e7a7-4f31-9cfb-52cd21c3739f";
var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
rootSchemaName: "SysUserInRole"
});
esq.UseAdminRights = false;
esq.addColumn("SysRole");
esq.addColumn("SysUser");
esq.filters.add("SysUser", Terrasoft.createColumnFilterWithParameter(
Terrasoft.ComparisonType.EQUAL, "SysUser", currentUser));
esq.filters.add("SysRole", Terrasoft.createColumnFilterWithParameter(
Terrasoft.ComparisonType.EQUAL, "SysRole", sysAdmins));
esq.getEntityCollection(function(response) {
if (response.success) {
var result = response.collection;
var isPortalUser = (result.collection.length !== 0);
if (isPortalUser) {
Terrasoft.utils.dom.setAttributeToBody("CustomUIOpportunityPageV2", true);
} else {
Terrasoft.utils.dom.setAttributeToBody("CustomUIOpportunityPageV2", false);
}
}
}, this);
},
If current user is portal user than "CustomUIOpportunityPageV2 = true" otherwise "CustomUIOpportunityPageV2 = false"
In css code its identifying "CustomUIOpportunityPageV2 = true" for portal user and applying the css successfully but its not identifying "CustomUIOpportunityPageV2 = false" when current user is not portal user and not applying css
body[OldUI=false][CustomUIOpportunityPageV2="true"] {
.grid-captions {
background: black !important;
}
}
[CustomUIOpportunityPageV2="false"] {
.grid-captions {
background: blue !important;
}
}
How can css for non portal user should work?
Any help will be highly appreciable
Regards