function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
YuvarajYuvaraj 

File attachment - automation.

Hi

 

   I have written the "FTP" program in Perl Script technology. So I would like to use this code for automating the FTP/attach the files to “Salesforce” website and insert this file attachment details in the opportunities database list.

 

So, please help me the procedure to automate the file attachment into the opportunities list.

 

Thanks & Regards

C.G.Yuvaraj

 


Message Edited by Yuvaraj on 05-02-2008 04:04 AM

Message Edited by Yuvaraj on 05-02-2008 04:27 AM

Message Edited by Yuvaraj on 05-02-2008 04:30 AM
werewolfwerewolf
Make a new Attachment object via the Salesforce API.  Base64 encode your file and put it in the Body field.  Set the ParentId field to the Opportunity you want to attach it to.  Set the Name field to the name of the file.  Insert the Attachment object.  That's all.
YuvarajYuvaraj
Hi
 
   I am not getting this point ("Base64 encode your file and put it in the Body field"), could you please send me more detail? If possible please refer some help.
 
Thanks & Regards
C.G.Yuvaraj
 
werewolfwerewolf
There's not much more to say about it.  You need to encode your file (whether it's binary or text) in Base64, which will convert it to a big string of characters.  Then put that big string in the Body field of your new attachment.
YuvarajYuvaraj
Hi
 
  Kindly check the below iusse, which I received this during installation of Mime-Base64.
 
Please check the fatal "error U1077" and reply me a solution for this issue.
 
 
C:\Perl\lib\MIME-Base64-3.07>perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for MIME::Base64
C:\Perl\lib\MIME-Base64-3.07>nmake
Microsoft (R) Program Maintenance Utility   Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
cp QuotedPrint.pm blib\lib\MIME\QuotedPrint.pm
cp Base64.pm blib\lib\MIME\Base64.pm
        C:\perl\bin\perl.exe C:\perl\lib\ExtUtils\xsubpp  -typemap C:\Perl\lib\ExtUtils\typemap  Base64.xs > Base64.xsc && C:\perl\bin\perl.exe -MExtUtils::Command -e mv Base64.xsc Base64.c
        cl -c    -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_ST
RICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC
-DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1    -DVERSION=\"3.07\"  -DXS_VERSION=\"3.07\"  "-IC:\Perl\lib\CORE"   Base64.c
'cl' is not recognized as an internal or external command,operable program or batch file.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code '0x1'
Stop.
 
Thanks & Regards
C.G.Yuvaraj