Copy link to clipboard
Copied
how to script save as button, with the name of existing document with prefix from selected field ?
i do this script and didt work
this.saveAs("/a/test/"this.getField("namaasesi").valueAsString" + this.documentFileName ) ;
Copy link to clipboard
Copied
Check the JavaScript console for errors.
Copy link to clipboard
Copied
its error and i dont know how to fix it
this.saveAs("/a/test/"this.getField("namaasesi").valueAsString" + this.documentFileName ) ;
SyntaxError: missing ) after argument list
1:Console:Exec
undefined
Copy link to clipboard
Copied
- You can't do that directly from a button. It requires a privileged context.
- You're missing a plus sign before the this.getField part. You also have an unneeded double-quote, after valueAsString.
- Do you have an A drive on your computer?
Copy link to clipboard
Copied
yes, i have A drive
Copy link to clipboard
Copied
this.saveAs("/a/test/" + this.getField("namaasesi").valueAsString + this.documentFileName ) ;
undefined
Copy link to clipboard
Copied
This is correct.
Copy link to clipboard
Copied
Thanks alot it WORK