You need to remove "Reference" option in "Insert PDF" step.
Thank you, that did solve some of the issues but I'm still getting the same error, "The file [New File Name] could not be found and is required to complete this operation" when I run this script.
Set Variable [$NewFileLocation ; Value: Get(TemporaryPath) & OrderItems::cs_FileName ]
Export Field Contents [OrderItems:cf_AdImage ; "$NewFileLocation"]
Go To Field [Select/perform ; OrderItems::cf_AdImage]
Insert PDF ["$NewFileLocation"]
Here I'm trying to export the file someone uploaded that does not have correct name. I export the file with the name I want to the temporary path then try to insert this file now with the correct name but each time it gives me the error message. I've also tried exporting the file to the desktop and inserting from there but get the same results.
Do you use
on "Insert PDF" ? (This is bad of FM that don't show specified value in list view of script editor exactly)
If you want only change the filename of container contents,
Set Field [ theField ; Base64Decode ( Base64Encode ( theField ) ; $newFileName_NotLocation ) ]