Happy new year!
It’s been a while since I had blogged – here’s an interesting issue that I worked on. I have an AE process that uses PutAttachment and GetAttachment functions to upload a file to an SFTP server. Running a trace returned the following error:
736 08.06.23 0.000000 ExecutePutAttachment (error): Error: URL Identifier not provided. Use URL Identifier to connect.
737 08.06.23 0.000000 EvalPutAttachment (error): return code (1) indicates attempt to upload file to storage failed.
738 08.06.23 0.000000 EvalPutAttachment: finishing and returning 1.
When I looked at the code, the PutAttachment and GetAttachment functions were referencing a URL string instead of a URL definition.
PutAttachment(&URL, &att_ref | &array [&j], &URL_ID2);
Here, &URL is the variable referencing the SFTP URL.
It appears that if you would like to place files on an SFTP server, you would have to use the URL definition as such, instead of using a URL string. Using a URL string would work fine when you use a FTP URL. So, changing the PeopleCode to be as below, fixed this issue:
PutAttachment(URL.ATTACHMENT_SFTP_URL, &att_ref | &array [&j], &URL_ID2);
This was in PeopleSoft HCM 9.1 with PeopleTools 8.53.06 , by the way.
Hope this helps! 🙂