Question

Emoticons readonly

Hi Teams,

 

I replicated managers' mood functionality on my account page.

Is it possible to make read only the controller for some users ?

Some user can change the emoticons and some else no.

Like 0

Like

3 comments

Hi Stefano.

 

The problem here is that:

 

1) MoodContainer has no click attribute

2) You can use document.getElementById("OpportunityPageV2MoodContainerContainer").style.pointerEvents = 'none'; and trigger it each time the page is loaded with the additional check of the system user role (OpportunityPageV2MoodContainerContainer should be replaced with your element code (can be received from the page inspector in the "Elements" tab of the console)).

3) This additional check on the system user role is the most difficult part: you need to retrieve a user session from the client using Terrasoft.sessionId, then form a ESQ to the SysUserSession table to find a record related to the value received from Terrasoft.sessionId (for a request as follows

 

select SysUserId from SysUserSession

where SessionId = 'ez5u2gsrczplpz4b13s31g0b'

 

). Then you need to run another ESQ to check if the SysUserId belongs has a record in the SysUserInRole table related to some role.

 

This is quite a difficult task that requires a separate project and cannot be solved in terms of a community post. Please reach your account manager in case you need additional help with the implementation of emoticons click restriction for some users.

 

Best regards,

Oscar

Oscar Dylan,

Thank you Oscar

I try to apply your suggestion.

Stefano Bassoli,

It works, thank you Oscar!

Show all comments