Hello,
I have a Form I have locked on my Mac so that deletion of records is not possible. Yet, on iOS it seems to be no problem to delete the same records.
Is this the intended behaviour?
Thank you,
Phil
Hi Phil,
I haven’t actually implemented the same access controls on the iOS version.
But it’s on my to-do list. Sorry about that.
Thanks,
Brendan
Brendan any update on permissions on IOS? Getting orphan records due to accidental deletion of main record tied to linked table.
<p style=”text-align: center;”>Any update on this Brendan? Still having trouble with deletion of records leaving orphaned records on linked tables.</p>
In one of my forms, I encountered an issue of missing parents. The contact field should contain the infos from the parent. This form script loops over all records of a form and checks if the contact field contains records. If no record is found (eg, length == 0), I set the select field. Afterwards, I can use a smart filter to find all these records where the select field is set to 1. This way, I can verify that these records are indeed the once I want to delete. Maybe this helps you!
function Select_No_Contact_Parent() {
const contact_id = 'fld-xxx';
const select_id = 'fld-xxx';
for (rec of form.getRecords()){
let contacts = rec.getFieldValue(contact_id);
if (contacts.length == 0) {
rec.setFieldValue(select_id, true);
}
}
document.saveAllChanges();
}
Select_No_Contact_Parent();
-
This reply was modified 1 year, 4 months ago by Daniel Leu.
-
This reply was modified 1 year, 4 months ago by Daniel Leu.
-
This reply was modified 1 year, 4 months ago by Daniel Leu.