The Document record you are trying to update is invalid

As I did like a hundred times, I set a PUT route in order to update a record. But this time, I get the following error :
The Document record you are trying to update is invalid.
Nothing happens in my network tab, like FA front-end is preventing me to trigger my route. I have no clue why. My model is pretty straightforward :

  const CoownershipDocuments = sequelize.define('coownershipDocuments', {
    displayName: {
      type: DataTypes.STRING,
    },
    documentName: {
      type: DataTypes.STRING,
    },
    sergicId: {
      type: DataTypes.INTEGER,
    },
    sergicUpdateTime: {
      type: DataTypes.DATE,
    },
    createdAt: {
      type: DataTypes.DATE,
    },
    updatedAt: {
      type: DataTypes.DATE,
    },
    onlyVisibleByCsMember: {
      type: DataTypes.BOOLEAN,
      defaultValue: false,
    },
    fileUrl: {
      type: DataTypes.STRING,
    },
    sergicCreatedAt: {
      type: DataTypes.DATE,
    },
    kind: {
      type: DataTypes.ENUM([
        'rcp',
        'statement',
        'mri_guarantee',
        'convocation',
        'cs_meeting',
        'default'
      ]),
    },
  }, {
    tableName: 'coownership_documents',
    underscored: true,
    schema: process.env.DATABASE_SCHEMA,
  });

I try to edit the displayName, onlyVisibleByCsMember and kind fields in the record summary view.

Expected behavior

FA front-end should send a PUT call on
router.put('/coownershipDocuments/:recordId',

Actual behavior

The Document record you are trying to update is invalid.

Hello @JeremyV,

Are you experiencing this issue only for this collection? Do the other ones work well?

Did you override the PUT route? If yes, could you share with me the logic behind it?

Thank you,

@Guillaume_Cisco
As I said, the route is not reached. Anything happening after is irrelevant.

I think that the issue is that my POST route requires a file input smart field, while my PUT route doesn’t - hence it’s not displayed on the page. Since the File input smart field is required in the CREATE form, FA won’t let me update the record if the file input is not visible and filled in the EDIT form.

That’s annoying.

It’s as I suspected. I need to add an extra validation in my POST route because FA won’t consider the required clause only when the field is in the form but also when the field is NOT in the form.