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

Like 0

Like

3 comments

Hi Muhammad,



I checked on my end - the given CSS works both with true and false value so I assume that your code is giving wrong value. You can open chrome debugging tools and put a break point to check which value you are setting.



To check if the current user is portal or not you can use Terrasoft.isCurrentUserSsp() function instead of the provided snippet.



Regards,

Dmytro

Dmytro Smishchenko,

Thanks for suggestion, its working in  "OpportunityPageV2"

From "UsrPortalDashboardCSS" the code is working fine. Whatever css defined its applying everywhere in list/detail/edit views of CRM and Portal (globally).

In code under "BootstrapModulesV2" I'm checking if current user is portal user than only apply CSS. same logic is working fine on other pageV2 for example "AccountPageV2" but the problem is that, CSS only applying on Account Section.

Below code is not working on "BootstrapModulesV2" console log is also not showing output.

Any help will be highly appreciable.

define("BootstrapModulesV2", ["css!UsrPortalDashboardCSS"],
function() {
	return {
		methods: {
			init: function() {
				this.callParent(arguments);
				this.initializeCustomCSS();
			},
			initializeCustomCSS: function() {
				var CurrentUser = this.Terrasoft.isCurrentUserSsp();
 
				if(CurrentUser === true){
					this.console.log("Current User is portal user");
					Terrasoft.utils.dom.setAttributeToBody("CustomUIPortalUser", true);
				}
				else {
					this.console.log("Current User is not portal user");
					Terrasoft.utils.dom.setAttributeToBody("CustomUIPortalUser", false);
				}
			}
		}
 
	};
});

 

Muhammad Shajiuddin,

Below code is not working on "BootstrapModulesV2" console log is also not showing output.

This is because the BootstrapModulesV2 simply returns an empty object, it does not have an init method so your code is never getting called. You can try a different schema to add this to such as MainHeaderSchema and use the init or onRender.

Ryan

Show all comments

Hi Team,

Is there a way to list out all the permissions of all the system users in one go. We are in the process of finetuning the user access as everyone is having a higher level of permissions. I am okay if I can do it via SQL too. Please let me know if this can be achieved in BPM. Via SQL is also fine. Thank you in advance 

Like 0

Like

2 comments

Hello Gokul!

Unfortunately, this kind of information can not be stored in bpm'online in the way you'd like to have it. As the matter of fact organizational structure can be rather complicated thus displaying of this information in the interface can not be implemented.

You can try to build basic tree of access rights using the following tables and SELECT SQL queries:

- SysAdminUnit (stores information about system users and roles)

- SysAdminUnitInRole (stores information about assigned roles to users)

Bogdan Spasibov,

Thank you :)

Show all comments

Whether or not a System User is Active can be read from System administration object.  However, when the state of Active is changed in System Users, no Signal is caught using Record Modified if the Active flag was changed manually in System Users.  The Signal only triggers a process if the Active status is changed by another process.

How can a process be started when changing the Active status of a System User manually?

Like 0

Like

1 comments

In order to create the functionality please use object "Users/roles (view)" instead of "System administration object" (https://prnt.sc/pj03qp).

Show all comments

Hi,

 

Am I able to send an email to all users that exist within the one user group (organisational role):

 

 

 

 

 

 

 

 

 

 

I have created the following process and need to update the 'To' field:

 

 

 

 

 

Like 0

Like

2 comments

Hello,

Unfortunately, you wouldn't be able to put "Functional role" as a value of "To" field of the "Send Email" process element using user tools. Our R&D team already working on adding this functionality, there is no ETA yet, however. You may build your process analogically to the "Send email to case group" base process that sends email to a group of people using script task.

Here is also another solution that can fit your needs: you can specify one recipient in "To" field in the business process "Send email" element and on mail-server side you can setup filters which will transfer notification emails to some specific folder and then mail-server can transfer all emails sent to this folder to other mailboxes. And it will fit your business target. But I will notify our R&D team about your request and ask them to raise the priority of the problem.

Best regards,

Oscar

1) Create a section to maintain a temporary contact list.

2) Add the contacts to the temporary list.

3) Loop through the list, deleting a contact from the temporary list after you email them.

Show all comments

Hi,

Custom CSS is working fine but its reflect on both interfaces (CRM/Portal) I need to apply CSS only for portal.

Any suggestion?

 

Regards

Like 0

Like

1 comments

Hello Muhammad!



In such case, you may add custom attributes or classes to html attributes basing on some condition. There is community article that describes how to achieve it: https://community.bpmonline.com/questions/how-add-custom-style-control-page-based-condition



Best regards,

Alex

Show all comments