No editable objects

0
When I want to create an object I need to have read and write access to the attributes. But then once created I want the created object not to be editable, but more can be created. How can I do this?
asked
2 answers
0

Mikel, 

 

You could add an extra attribute like ‘IsNew (default true)’. Change the value to false when committing.

Now you can add a Access fule Xpath constraint on the object. In the Access rule, put an Xpath constrains with [IsNew].

 

answered
0

Give no-one any other right than read and to create the objects, use a microflow that creates them in the background.

Use the non-persistable entity to create one object, that you show on a page, fill the attributes:

Then in FixedThing_Create, use executeMicroflowInBackground from CommunityCommons;

And the last microflow creating the actual FixedThing for you.

So there you go, now your newly created object will not get changed anymore.

Or will it…

It is still possible to change it, with the exact same execinbackground microflow. You can add a bit of extra don’t-ever-change by adding a before commit event.Make it check if the object already exists, and if so, make the event return ’false’.

So there you go, now your newly created object will not get changed anymore.

Or will it…

It is still possible to change it, with the exact same execinbackground microflow and make it ‘commit without events’. But I hope this will do for your use-case.

 

answered