Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
4

Disable the ability to save a file

Explorer ,
Jan 23, 2024 Jan 23, 2024

I know there isn't a direct way to do this, unless something has changed. We keep our files on our cloud server, we have no problem with people doing a save as, but we don't want them filling out fillable pdfs and then saving them back over the original. I found this script 

 

// On Blur script

if (!event.target.valueAsString) {
    app.alert("[Provide field description here] must be complete. Please enter something, anything", 3);
}

And it works, but its giving me the error when I click "save as" as well, it lets me save as, but still kicks back the error, is there a way to write this differently, or another solution to make it so people can't save over my originals?

TOPICS
General troubleshooting , How to , JavaScript
518
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 23, 2024 Jan 23, 2024

Why not making the source file read only! Simplest solution to the problem.

ABAMBO | Hard- and Software Engineer | Photographer
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 23, 2024 Jan 23, 2024

So I tried that, but it won't stick and I can't figure out why, I have set it to read only multiple times. I just tried it again, it shows as read only, i opened it up, entered something, clicked save, it saved overtop and then I went to check read only and its unchecked. Frustrating

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 23, 2024 Jan 23, 2024

That is an OS problem. We have multiple network resources that are read only to "ordinary" users, but we, the resource owners, can edit them. Talk to your IT guys and gals.

ABAMBO | Hard- and Software Engineer | Photographer
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 23, 2024 Jan 23, 2024

ok, well, thats odd cause i have another file in this folder that is read only and it works, so this is weird. So there is nothing i can do to the script to make it not give the error on save as , im at a  loss here. And I am the IT person and I can't see any settings in there to change this.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 23, 2024 Jan 23, 2024
LATEST

I just had a thought, can i force someone to click the Reset button before they click save?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 23, 2024 Jan 23, 2024

When you share a file from the cloud the user usually only gets access to view and download it. They can't overwrite it on the cloud. If they can, something went very wrong, indeed. Anyway, it's impossible to prevent a PDF file from being saved from within the file itself.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 23, 2024 Jan 23, 2024

If the file is open by someone else at the same time then no, they can make changes, but they can't save. So that part is fine. I want it so they stop saving over the document, its an expense sheet that everyone here needs to use, some in different offices, id love for them to save as and save a local copy right off the bat, but fact is mistakes still get made and people accidentally save over. I have locked the cells so they can't mess with the calculations and scripts and added a reset button, so when i found the javascipt error message I thought I had finally won, but its just confusing that it doesn't save, but, will save as, and show the same error message, and still save as, does that make sense?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines