Question

IsModelItemsEnabled attribute on Portal Page

Hello Community,

 

I have custom object edit page designed for portal user and i would like to lock editing data od this page.  So based on documentation i set IsModelItemsEnabled as false inside onEntityInitialized function after this.callParent(arguments):onEntityInitialized function:

https://academy.creatio.com/docs/developer/elements_and_components/inte…

 

It seems that the same code works on standard edit page but isn't on portal page. All fields became editable.

 

Any idea why this is not working on portal page ?

 

Regards,

Marcin


 
Like 0

Like

1 comments

Hello Marcin, 

 

Actually you have a few options to achieve it.

 

The first one - you can set up access rights for portal users. In configurations find "Object permissions" and set up required permission for particular objects. This is the best way to handle it. Check the example:

 

 

The second way - you may go to section wizard (in my example will be "Contacts" Section) and mark some field as "Read-only". So these fields can't be changed. 

 

 

Then if you check the "ContactPageV2" schema you may see that this field has now new attribute "enabled": false  which was generated automatically when we marked field "Age" as "Read-only". 

 

 

You could make the same in your "PortalPage" by adding this attribute to your own fields or even add a new logic to attributes.

 

Best Regards,



Bogdan L. 

Show all comments