This topic is locked

remove edit icon after 48 hours

3/14/2021 8:49:59 PM
PHPRunner General questions
W
wfcentral author

I have a system where records are created with a timestamp. I need to make the edit button unavailable 48 hours after a record is created. Has anyone done something like this?

A
acpan 3/15/2021

Yes, there is a built-in function for that purpose - IsRecordEditable.



I have a system where records are created with a timestamp. I need to make the edit button unavailable 48 hours after a record is created. Has anyone done something like this?

W
wfcentral author 3/17/2021



Yes, there is a built-in function for that purpose - IsRecordEditable.


THANKS! That worked.
I have one more step they are asking for now - these records have child records attached to them and at the same time the master table becomes "not editable" the child tables should also lose the ability to add/edit/delete. So, now I'm looking for that.

A
acpan 3/17/2021

That's easy, in the child tables, you can get the master table's timestamp data similar to this question

Hide Add Button, likewise calculate the timing and hide the child tables' buttons as described.