parse-dashboard icon indicating copy to clipboard operation
parse-dashboard copied to clipboard

Allow saving records even if required fields are empty

Open RaschidJFR opened this issue 2 years ago • 1 comments

New Feature / Enhancement Checklist

Current Limitation

The Dashboard won't allow saving objects with required fields left blank, even if these fields could be populated in the beforeSave trigger (for example, due to a more complex logic being required like calling a different microservice).

Feature / Enhancement Description

  1. The dashboard should attempt to save the objects even if one or more required fields are left blank.
  2. If the object(s) is saved successfully (because it was populated by beforeSave), the job is done.
  3. But if the save fails due to any required values missing, then it should highlight the missing fields in red (as currently does).

Example Use Case

Let's say we have a class SmartContract with a required column abiInterface whose value is populated in the beforeSave trigger by calling a microservice, like a function in the blockchain.

Ideally, the user shouldn't worry about populating fields that will be addressed by the cloud logic.

Alternatives / Workarounds

  • Adding any random value to the fields, which will later be updated by beforeSave (making sure the beforeSave logic does not skip populating fields that are not null or empty)
  • Another workaround is to unmark the field as required, but that removes the data integrity check.
  • Another possible solution would be adding a default value (which could later be updated by the triggers), but this feature doesn't seem to work (they don't get loaded anywhere when adding a new record).

3rd Party References

RaschidJFR avatar Jan 08 '22 02:01 RaschidJFR

Thanks for opening this issue!

  • 🎉 We are excited about your ideas for improvement!