How can I change the name of the file created from a workflow email?
Description
Cause
The document name generated is hard coded.
Resolution
[BCB:5:Third-party support:ECB]

You can use an entry point to rename the file before sending the file that is built with the GFILPATH variable.

Contact your developing parnter for assistance.

The following example is provided as a courtesy and is not supported by Sage X3 Support.

 

Entry Point MESSAGE from AWRK
Example of usage

$ACTION
#Infbox  " ACTION  "+ACTION
Case ACTION
When "MESSAGE" : Gosub MESSAGE
Endcase
Return

$MESSAGE
# We want to do that only for some Workflow Rules
If [F:AWA]CODE <> “MYRULE”
   Return
Endif
 Local Char FICHIER(80), NAME(80)
Local Integer STAT
# Here we build the path and the name for the attached PDF
NAME = “\NEW_NAME.pdf”
FICHIER=filpath("","","")+NAME   
# Then we rename the generated pdf
Call  MOVE (PCEJOI(NBJOI),FICHIER,STAT) From ORDSYS
PCEJOI(NBJOI)=FICHIER
Return

 

Steps to duplicate
Related Solutions