How to auto fill timestamp values while creating a document in collection?

I am trying to create a new document under a collection, createdAt and updatedAt fields are mandatory because timestamp is set as true in model.
Can forest handle these fields while I create new document.

Screenshot of current error:

  • Project name: EyesWide
  • Team name: operation
  • Environment name: Production
  • Database type: Mongodb

Hi @aayush-sinha ,

Forest Admin doesn’t provide a way to define default values in creation/update forms, but you can replace the default create action by a custom action that triggers a create with the default values you want, by calling collection.create({<record_data>}) from the action context.

Hi @aayush-sinha ,

there is also the option to override the collection.create: