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

Disable the ability to save a file

Explorer ,
Jan 23, 2024 Jan 23, 2024

Copy link to clipboard

Copied

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

Views

369

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

ABAMBO | Hard- and Software Engineer | Photographer

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

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