widget visibility conditions

0
Hello everyone, I created some pages where attributes have visibility conditions, depending on other attributes of the entity. So far so good, the problem is when I delete the registry appears the error below. Any idea?     Unable to get a member from variable $currentObject, because you do not have sufficient permissions to "Importacao.PedidoCompra.DataFechamentoCompra". Error: Unable to get a member from variable $currentObject, because you do not have sufficient permissions to "Importacao.PedidoCompra.DataFechamentoCompra".     at new t (http://localhost:8080/mxclientsystem/mxui/mxui.js?637069303588392570:40:178096)     at e.resolveAttribute (http://localhost:8080/mxclientsystem/mxui/mxui.js?637069303588392570:40:9501)     at e.resolve (http://localhost:8080/mxclientsystem/mxui/mxui.js?637069303588392570:40:8861)     at e.evaluate (http://localhost:8080/mxclientsystem/mxui/mxui.js?637069303588392570:40:8214)     at http://localhost:8080/mxclientsystem/mxui/mxui.js?637069303588392570:40:8009     at Array.map (<anonymous>)     at e.evaluate (http://localhost:8080/mxclientsystem/mxui/mxui.js?637069303588392570:40:7983)     at m (http://localhost:8080/mxclientsystem/mxui/mxui.js?637069303588392570:40:9987)     at y (http://localhost:8080/mxclientsystem/mxui/mxui.js?637069303588392570:40:10111)     at http://localhost:8080/mxclientsystem/mxui/mxui.js?637069303588392570:73:44581
asked
5 answers
1

Double check your access rights of that object.

Regards,

Ronald

 

answered
0

Hey Tiago,

 

the userrole of the account of which you are logged into at the moment does not have access rights on (at least) the DataFechamentoCompra attribute of your PedidoCompra object.

You can set this in the access rules tab on the PedidoCompra entity. You'll need at least read rights for that userrole that you are logged in with on the attribute to let the client process that expression in your screenshot.

answered
0

Change the visibility to

$currentObject != empty and $currentObject/DataFechamentoCompra  

 

Due to a rare order of widget unloading the object is already deleted but the visibility rule is checked again.

answered
0

This is a bug that is fixed in Mx8.2.0, so if you upgrade your project to Mx8.2.2 it should be solved. Also see the release notes: https://docs.mendix.com/releasenotes/studio-pro/8.2#fixes

 

answered
0

Let's believe it's fixed in 8.3. Give it a try and let us know whether that works finally for you. Good luck.

When you had a conditional visible widget and you deleted the object used by the conditional visibility expression, this resulted in an error. This has been fixed. (Tickets 88646, 88783, 89114, 89756, 90495, 90680)

answered