Can i modify the file name on attachment via script? | Community
Skip to main content
Level 4
Jul 10, 2023 2:46 PM UTC
Solved

Can i modify the file name on attachment via script?

Good morning everyone 🙂

 

I was wondering if i could via script, change the name of the PDF file that is created when i use the submit button and it attaches the current PDF into an email.

 

Something like a name + date:: 2023-01-25_FN LN.PDF

And just in the hopes this helps, i use the following script to fire off the said email:

event.target.submitForm({cURL: cEmailURL,cSubmitAs:"PDF",cCharSet:"utf-8"});

 

Thx again for the help, this would be awesome if its doable.

 

PAtrick

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Vijay_Katoch
Vijay_KatochAccepted solution
New Participant
Jul 12, 2023 10:26 AM UTC

Didn't find any parameter to pass the custom file name.

There is one property 'documentFileName', see if you can do something with this.

If you do :

app.alert(event.target.documentFileName); -> it will give the current file name.

I think something need to be done with documentFileName property.

3 replies

radzmar
Level 10
Sep 27, 2023 6:31 PM UTC

It's not possible to change the name of the attached file via script. You'll have to save the document under the desired name before sending it. 

Translate
Vijay_Katoch
Vijay_KatochAccepted solution
New Participant
Jul 12, 2023 10:26 AM UTC

Didn't find any parameter to pass the custom file name.

There is one property 'documentFileName', see if you can do something with this.

If you do :

app.alert(event.target.documentFileName); -> it will give the current file name.

I think something need to be done with documentFileName property.

Translate
Level 4
Jul 12, 2023 4:12 PM UTC

sounds good, i will take a look at that property.

 

thx a lot 🙂

Translate