T
Twenty2w ago
kyrpav

How to control uncontrolled creation of records

Is it possible to have workflow that blocks creations or changes on a record are not allowed? I mean you can not create a record without a value or you can not update a record letting something empty if you have set another variable. Like you can not set a status of a record to closed if you do not set also the relative date. Is it possible to block or to control in any case? The user might try by mistake create or edit several records where the core data are missing
14 Replies
ɃØĦɆᵾS
ɃØĦɆᵾS2w ago
Blocking creation of record is not possible as newly created record in UI has all fields empty by default, preventing update can be possible with workflows or extension but it's gonna be problematic How can you deduce when update should be blocked and when not?
kyrpav
kyrpavOP2w ago
creating a Company record without company name should be prohibited. Also updating a Company record removing the Owner it might also been not accepted by some business logic. So the first it is about mandatory fields though and the second is control of proper handling of data. Or another case you can not set completion date in an Opportunity if you do not set the outcome to proper value (won , lost ... ) the outcome could be also other values. The consept is to properly prevent of editing whateve without conditions. you can not just allow anyone to write whatever Imagine another case a model for sales that has object that it is sold and qty and they leave the quantity empty these things have to be controlled or it will be chaos and the users tend to make these mistakes In general deducing is controlled by business logic
ɃØĦɆᵾS
ɃØĦɆᵾS2w ago
That would only work via API, in UI any logic check triggered by record creation will fail
kyrpav
kyrpavOP2w ago
i could work if you have block update functionality and trigger on before update. That will be always called if there is a workflow for a specific object update. that will work to make validity checks and it is correct to allow the update. Again if the user creates such workflow via Api also the mandatory fields work . but via UI when the real mess will happen is the problem. Real users will not use the API To write in in proper English a defined workflow that runs before update of a model. If the workflow successes then the update is done if not then if forbids the update with relevant info.
ɃØĦɆᵾS
ɃØĦɆᵾS2w ago
I understand that but there's no such thing in current state I'm also afraid that would require a huge work in ORM layer itself to add pre CRUD triggers
kyrpav
kyrpavOP2w ago
it is not the best but the alternative is to have save/update buttons and allow workflow to check again uppon button trigger to run workflow tests it is the same though but in any other case everything is uncontrolled and you rely on the users not to be a mess in 15days after release
ɃØĦɆᵾS
ɃØĦɆᵾS2w ago
The only possible way to do it currently is check what fields and their values have been updated and revert the update if constraints are not met but user won't get any info back (like in popup), no matter if it was done with workflows or extension apps
kyrpav
kyrpavOP2w ago
this is also bad and it will raise tones of questions for the system. since users will not understnad and not know what happened. ALso imagine a user making a change and not checking and coming back after 10 days . he/she will not remember
ɃØĦɆᵾS
ɃØĦɆᵾS2w ago
I think informing user about anything will be done in Q1 next year https://github.com/twentyhq/core-team-issues/issues/210
GitHub
📮 Inbox V1 · Issue #210 · twentyhq/core-team-issues
About Ability to see notifications/tasks inside Twenty
kyrpav
kyrpavOP2w ago
does this include sending notification from workflow to the screen of the user only ? or it includes the rest that we discussed? cause informing is one part of the problem if you block the udpated. Also i have not seen the way of reverting the update. How can this be done
ɃØĦɆᵾS
ɃØĦɆᵾS2w ago
I'd like to know as well @Thomas could you explain what will be contained in inbox v1? Basically, Twenty exposes names of updated fields as well as their values before and after the update in properties of updated record
kyrpav
kyrpavOP2w ago
i am trying to introduce the system to the whole company leaving salesforse . but it will be very hard to explain that there is not control solution to preserve clean data inside no mandatory fields , no validation checks, no dependend dropdown menus ( probably in Q1 of 2026) that makes some possibilities cleaner one more thing is Complex searches (probably if i understand well Q1 of 2026), i mean search searching people of companies that belong to specific Region (region belongs to company and the search to be done in the people's view where you can currently only filter by company's name) complex filter it is but very basic in business logic so it is the very first thing that some manager will ask.
Thomas
Thomas2w ago
I think it will be an evolution of the Tasks object that will be able to display different record pages according to the use case, but this is still TBD!
kyrpav
kyrpavOP2w ago
it sound not close to what i was asked except if you are talking about autmatic task creation for fixes in the records they made (which is good idea) but still does not prevent the mistakes

Did you find this page helpful?