Skip to content

Allow saving records even if required fields are empty #1988

Open
@RaschidJFR

Description

@RaschidJFR

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bounty:$20Bounty applies for fixing this issue (Parse Bounty Program)type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions