-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documents and Workflows #100
Comments
Yeah, I think I updated the README before ever finishing that code :( So, to upload files use set_note_attachment... something like this: https://github.com/chicks/sugarcrm/blob/master/lib/sugarcrm/connection/api/set_note_attachment.rb You can access this method like:
You'll need to create a note, and attach the document to that note, then create a relationship between the note and the record that you want it to show up on... not the best approach, but start there. As far as workflows, the best option is to trigger workflow actions via logic_hooks (similar to ActiveRecord callbacks). |
PS, Congrats on being the 100th issue submitter! |
Ah thank you! and thanks for the prompt response :) |
Hi some more questions sorry. How do I get a valid file object variable from something like a file in the params variables? (like I have a params[:document] from an upload form)? Everything I have tried sayts it is either an empty file or is invalid for sugar. Is this method only for attachments on notes? I was hoping be able to have a document with revisions that I could then attach to a note or a contact/lead. |
Also for the logic hooks, these would need to be done in PHP? |
and other one. if I use the get_note_attachment method am I doing this right?
The code above says invalid data. Sorry about all the questions. We are trying to asses which CRM is best for our rails site and time is running short. |
Logic hooks are done in php, yes. If your instance is On-Demand, you can build a module loadable package for them... Something like this: http://support.sugarcrm.com/04_Find_Answers/03_Developers/Module_Loader/Examples/Creating_an_Installable_Package_for_a_Logic_Hook Which version of Sugar are you using? The API I built this for is pretty old and in version 7 there's a much better REST API. |
I suppose I would be using the newest version but I really don't know PHP at all. |
chicks, I'm just starting my project now, if I just need the ability to query objects, what would be your suggestion? Would your gem still be the way to go or is the API too old? Your work looks great and would love to use it, was just a bit concerned by what you said. :) Thanks and keep up the great work! |
Gem works fine for query and updates! It's really just a wrapper around the v2 web services library, which is still quite functional and supported. |
Hi, I've been trying out this gem today and I need to use the API with documents (uploading,downloading,sorting) and possibly with workflows as well. I can't find much information and how to do these though. The one upload example in the README I can't get to work (seems there is no uploadfile method). Is there any more information on how to use these somewhere?
The text was updated successfully, but these errors were encountered: