Hi all,
This time i really need your wisdom,
With a Custom button (Server code) i create 3 files and place them in a \Orders directory.
Article_0000059.dds
Job_0000059.dds
Excel_0000059.xlsx
This works fine,
Later in the Custom Button server code i want to pickup these files and Add them to the documents. These needs to be added as separate files in the document center. Table docs i have created.
Document is medium text field.
I even attach the files to my email, this works fine too.
$attachments = array(
array('path' => getabspath($Files1)),
array('path' => getabspath($Files2)),
array('path' => getabspath($Files3))
) ;
I have seen lots of articles and tried many codes but i cannot get it to work.
Lots of articles tell me to place the code in the Before, but the files are not created in the Before added event.
What is my best options in code in a custom button?
The files can be copied from \Order to the \files. That doenst matter me at all.
Kind regards,