In a modular content field, if you specify only one type of required block and you add a validation requiring a minimum number of blocks, like here for example:
We go ahead and by default create the required empty blocks for you when you create a new record, like this:
So your editors will see from the get go all the fields that they will need to populate and save a few clicks!
This change was long overdue, and we're glad we were able to address it! 🥳
Suppose you have ie. a model with 10 fields, 9 of which are optional. Until now, when creating a record, you were required to specify... all 10 fields. If you didn't want any value for the optional ones, you were required to pass a null value in any case, or the API call would fail:
1
const{ SiteClient }=require("datocms-client");
2
3
const client =newSiteClient("YOUR-API-TOKEN");
4
5
const record =await client.items.create({
6
itemType:"1234",
7
requiredField:"Lorem ipsum",
8
optionalField1:null,
9
optionalField2:null,
10
optionalField3:null,
11
optionalField4:null,
12
optionalField5:null,
13
optionalField6:null,
14
optionalField7:null,
15
optionalField8:null,
16
optionalField9:null,
17
});
In addition to being redundant and inconvenient, this was a maintainability problem over time, because when a new optional field gets added on the model, you need adapt every script and add that null value. Well, now optional fields can be omitted from the payload during creation:
With today's update, we decided to split two permissions in order to give you a more fine grained permission system.
Before
Create/Duplicate permission, as it was before
After
New splitted permission: Create and Duplicate record permissions
What happened to existing roles in my project?
This change did not alter what your users were already able to do, or not to do. For instance, if an existing role had the ability to "Create/duplicate" records, the same role has both the permissions ("Create" and "Duplicate") defined.
Beginning October 25, 2021, DatoCMS will no longer support Internet Explorer 11 (IE11) and users may have a degraded experience, or be unable to connect to our apps and services.
If you're still using Internet Explorer, you will need to transition to Microsoft Edge (or any other modern browser) before October 25 to start enjoying a faster, more secure and more modern browsing experience.
This change will allow us to work faster, and offer better performance on the latest browsers.