Is it possible to create an entity based on a view (so with the "Represents Structure of Database View" checkbox checked, and with the view created using a SQL script) that inherits its record permissions from a "real" entity? I tried to do so by simply checking the record permissions checkbox and specifying the parent object in the "Object to inherit access permissions from" field of the entity, but this doesn't seem to work.

 

My setup is that we have the OOTB Leads entity, and then I've created a view over the top of it taking all columns but with a filter condition, to be used for reporting over Leads while filtering out certain Leads that should never be included in reporting so we have a more consistent reporting basis and don't have to make sure to include those filters in every widget. I added 2 columns to the view based on the Id and LeadName columns called UsrBaseLeadId and UsrBaseLeadName, which then have a lookup column UsrBaseLead added over them in the view-based entity. This lookup is then used as the "Object to inherit access permissions from" for the view-based entity.

 

There aren't any errors thrown in the logs when trying to do this, but non-super-users just can't see any of the records. When I tried to check a record in the view's permissions, I could see that the SysRights table for the view entity doesn't exist, so I tried creating that rights "table" as a view in the database that took its data from the Rights Table of the real entity, but while that seemed to work inasmuch as I could check a record's access rights and see that the correct rights were there and was even able to modify those rights, it didn't make it visible to a non-super-user.

Like 0

Like

3 comments
Best reply

It would be great to have the view be able to inherit permissions from some object that the view has as a lookup column. However, I don't believe that is possible. What I typically do is this:

  1. Create a view and include as a column some other object that has permissions (for example, if the view includes an Opportunity lookup column and the account has permissions)
  2. Anywhere the view is used, include a filter condition that some column on that related object is not null (that would never be null). Plus it cannot be the Id or the column used as the display value. Example, if my view has a lookup for Opportunity, I could use Opportunity.Stage is filled in.
  3. Using this approach, the user will only see the rows corresponding to the related record that they have access to, since if they cannot view the related opp the Stage will return a null value. 

It's not ideal and definitely not secure, but it does limit the view rows to what the user can see on the related object.

Ryan

Anybody have any experience of working with such a setup?

It would be great to have the view be able to inherit permissions from some object that the view has as a lookup column. However, I don't believe that is possible. What I typically do is this:

  1. Create a view and include as a column some other object that has permissions (for example, if the view includes an Opportunity lookup column and the account has permissions)
  2. Anywhere the view is used, include a filter condition that some column on that related object is not null (that would never be null). Plus it cannot be the Id or the column used as the display value. Example, if my view has a lookup for Opportunity, I could use Opportunity.Stage is filled in.
  3. Using this approach, the user will only see the rows corresponding to the related record that they have access to, since if they cannot view the related opp the Stage will return a null value. 

It's not ideal and definitely not secure, but it does limit the view rows to what the user can see on the related object.

Ryan

Yeah that's a clever workaround, many thanks Ryan! Agreed about the security aspect, but for the the cases where it's just about having those record permissions used to define non-security visibility as I currently have for the base entity it will work for now.

 

It would definitely be good for the view entities to be able to inherit permissions from lookup columns though, and feels like it would be a relatively quick win for Creatio to add, as most of the functionality around that would already exist. It could even be done in a no-code way by enabling the creation of these view-based entities directly in the config, effectively adding a logical layer to the platform which would be great for filtered views into the data and adding virtual calculated fields. A man can dream.

Show all comments

Hello Everyone. Hope you are doing good.

I created a view object in Creatio and created a detail using the same object. The values are being fetched as shown in the first figure below.

 

But, as I double click the record, then values are not displaying as shown in the second figure.

 

Stay Safe. Thank You.

Like 0

Like

1 comments

Hello Rikesh,

 

Hope you're doing well.

 

Please try to generate and compile the application, additionally, the pool can be restarted, and perform flushing the Redis. If it didn't help, please check if all the necessary columns (Id, CreatedById, ModifiedById, ModifiedOn, etc.) were added to the view object. Possibly next Community posts will be helpful for solving the issue you have faced:

In case after performing the mentioned operations and checking the issue still persists for you, please open the web developers console (in Google Chrome just need to press F12) before opening the detail record and check if there are any specific error notifications that can point at some missed configurations for the needed detail.

 

Best regards,

Roman

Show all comments

Hi Community,

I found below link on academy on how to create view object on bpm online.

https://academy.bpmonline.com/documents/technic-sdk/7-13/localizing-views

I created my object schema below

 

 

And execute below script to create the view in database.

After executing the view, I made sure that there is data by executing select query on that view

After doing this, I tried to display the data of this view in a dashboard list. but unfortunately I am not getting any data from this view object on crm. Am I missing something, any idea how i can fix this issue?

Like 0

Like

3 comments

You view do not return Inhrerited columns (

Such as this: id, createdOn, createdBy....) 

 

Hi Grigoriy,

Thanks for your reply, any suggestion how I can fix this

Fulgen Ninofranco,

In order to create a view in the system you need to do the following:

1. Create a new object in the system configuration. Give it the same name as view. Set "Represents Structure of Database View" option to true (put a tick); The object should include all columns, that you will add to the view.

2. Run a script to the database to create a view with needed columns.

Please take into account, that structure of columns in the view should match the object columns structure. 

Based on your screenshot I can tell, that in the object for the view Contact and Account fields will be lookup type columns and will be referred as [Column name]+Id e.g. UsrContactId, UsrAccountId. However, in the view, you have named them simply UsrContact and UsrAccount.  Please check the naming.

Also, as you open dashboards, please open developers console as well (F12). You will see errors indicating which column cannot be found. This will help you to determine the issue.

Regards,

Anastasia

Show all comments