Hi Team – Is it possible to delete photos using a script? I didn’t see any methods in the Javascript API. I’m able to cycle thru the photo object, but could not find a method to delete a photo.
thanks,
rocky
Hi Rocky,
Unfortunately there’s no direct way to delete a photo. But you can disconnect a photo from your record by either updating the array of dictionaries for the Photo field or if you want to clear them all, call record.setFieldValue(photo_field_id);
. That’ll basically set the value for the Photos field to null. Call form.saveChanges();
after to save it. But the photo will still be on disk.