Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Tuned Listener
kr123456
Posts: 25
Country: France
Message 11 of 11 (377 Views)

Re: how do i attach documents under doucments tab

[ Edited ]

Thanks for posting your lead Matthew.

 

However, I just found another way some minutes ago, wich suits very well.

 

In fact, I wrote the necessary code (CreateHistory(...) and so on) in a C# Console Application Project. I made it so it can accept some string arguments, like ACT Database path/user/pass, attachment path, contact GUID...

 

After generating it and putting the command.exe file in the appropriate folder, I just called the PHP exec() function, which launches the command.exe file and passes all necessary arguments.

 

This executable file uses ACT Framework dll ressources.

- First, it creates a new ActFramework and log on, under an administrative account.

- Second, it seeks the concerned contact & opportunity in ACT with their GUID passed in parameter (calls the GetContactsByID method).

- Third, it calls the famous CreateHistory method and try to insert the history + a PDF attachment (inside a try/catch block).

- Finally, I made it append the result on a txt log, whatever it is, so I can quickly see if the insertion succeeded or failed.

 

So I think the problem effectively came from some server permissions things... In my case the server doesn't call the methods it-self, it delegates the job to a "local" executable, as if a local application called the methods. So no more problems with permission to access the right folder...

 

I'm not sure if it is the way it goes but anyway that solution worked for me.

 

Thanks again to the support guys, who took the time to help !

Please use plain text.