Date fields try to update even though they are not allowed

I have restricted most of the fields of a Recruit record to view-only for a particular role; only four fields on the record are updateable. However, when I attempt to edit and save the record, date fields attempt to update, and the save fails because they are not permitted to be updated by this role.

This only happens with date fields; everything else seems to work fine.

Suggestions?

Interesting, will try to reproduce and fix.
Currently i guess the only thing to avoid it is to give them permission to update that field.
Does that fix the issue?

It might solve the technical issue, but it doesn’t solve the business requirement. I don’t want those fields to be editable by certain roles.

Of course, I was just asking if it allows the saving if you change the permissions.
Do you have a required value on the date field? Or any other validator.

EDIT:
After testing it i cannot reproduce it.

I have 2 fields in a module, one is readable/updatable the other which is date is only readable.
I can save the record just fine and can only update the non date field.
Im guessing there is some extra configuration you have that causes this.

Joze,

Here’s another example that might illustrate it better, for future consideration:

  1. Here’s the record in view mode. The date in question is in the middle column (Medical Review Completion Date). The role that I’m logged in as does not have permission edit the field, although they can obviously view it:

  2. Here’s the record in edit mode. Note that the date field and a couple of others (in the red box) are not editable.

  1. Here’s what happens when I save the record. Despite the fact that the date field was not changed, and not even editable, I get an “Update Denied” error for the date field (none of the other, non-date fields exhibit this behavior).

While I may be able to get around the issue by allowing this role to edit that date field, this is not an ideal solution. If it’s a bug, it should probably be addressed because I’m sure others will have the same problem. I’m using the latest pull of 2023.9.7.

Thanks for your assistance!

This will hopefully be fixed with 2023.9.8
Thanks for reporting

@jfortun - Hi! Can you share the root of issue? I’m asking b/c I’m seeing a slightly different (but maybe related?) date issue and looking to assess whether this fix will address my issue too? :slight_smile:

My issue is that the system seems to inject an update/revision to the opp for dates that aren’t changing every time a workflow runs over them. It’s almost like the date format (which is set to Date Only) is triggering an update? Please forgive me if that’s way out of line!

Interesting, it is most likely related but I can’t say for sure if it will fix the issue.
You can open an issue now if you wish. Or wait for the patch and open one if its still happening

Date only fields were designed to not save the timestamp, which was an oversight so that’s whats being fixed currently.

In the meantime i would suggest you use full datetime and format it so it shows only date (using the format in the configurator).

Update on this, turns out that this happens if you had a date&time field, and switched to date only when you already had some records with values. If you set the date again or update the data in the Database so it doesn’t include the timestamp then it should be fixed.

Same for other date only/time only issues. We’ll disable switching if you have existing records.
In the future we should change the data in the DB when the configuration is changed but that’s a bigger problem/feature.

There is also an issue on read with date value sanitization that will be fixed as part of 2023.9.8