Results 1 to 3 of 3

Thread: Adding documents programatically

  1. #1
    FusionFrog is offline Junior Member
    Join Date
    Nov 2008
    Posts
    3

    Default Adding documents programatically

    Hello,

    I am using the CE 5.1 version and have been tasked to auto create a PDF document in the document module upon creation of a quote.
    The quote module now creates its own pdf document and puts it in sugar_root/pdf_documents. A relationship between quotes and documents has been setup.

    The challenge I have now is to pass parameters to the document module and a link to a file that exists on the server.
    The result should be an entry in the document subpanel in the details of the quote.

    Can anyone suggest a solution.

    Thank you in advance.

    Tom

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Adding documents programatically

    Quote Originally Posted by FusionFrog
    Hello,

    I am using the CE 5.1 version and have been tasked to auto create a PDF document in the document module upon creation of a quote.
    The quote module now creates its own pdf document and puts it in sugar_root/pdf_documents. A relationship between quotes and documents has been setup.

    The challenge I have now is to pass parameters to the document module and a link to a file that exists on the server.
    The result should be an entry in the document subpanel in the details of the quote.

    Can anyone suggest a solution.

    Thank you in advance.

    Tom
    Hi Tom

    That seems to be a good implementation! Congratulation!
    It is not clear for me how you are going to pass parameters to the document.
    Can you provide us a well detailed work flow you are imagining to accomplish all these tasks?
    This way we can help you suggesting some implementation.

    Regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    FusionFrog is offline Junior Member
    Join Date
    Nov 2008
    Posts
    3

    Question Re: Adding documents programatically

    Hi André,

    Thank you for you response. I am not sure what the best method is to pass information to the document module. This is what I am asking about. I have modified the quotes DetailView.php module to accept a $_SESSION['save_pdf'] flag which triggers a PDF to be created then redirects back to it self without the flag to display the details. The result then might be:

    * A quote with the name "Sample Quote" - Quote # 081105110033
    * a PDF document located on the web server named "pdf_documents/Sample Quote-081105110033.pdf"

    If I were to do this manually I could
    1) Download the PDF from the server do my desktop
    2) View the details of the quote and select 'Create' in the document Sub Panel
    3) Enter the Document Name/Version/Publish date and upload my PDF from my desktop.

    Is there a way to do the above steps automatically?

    Thanks
    Tom

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Documents Module - Adding through FTP
    By lmcanada in forum Help
    Replies: 0
    Last Post: 2008-02-21, 06:59 AM
  2. Adding documents to *anymodule* DetailView
    By kmitz in forum Developer Help
    Replies: 4
    Last Post: 2008-01-03, 03:48 PM
  3. Sugar V4.5 Forums Module download?
    By kickedmydog in forum Installation and Upgrade Help
    Replies: 6
    Last Post: 2006-11-12, 12:57 AM
  4. Replies: 1
    Last Post: 2006-09-11, 03:38 PM
  5. Problem Adding PowerPoint Documents to the DB
    By MMorgan in forum General Discussion
    Replies: 1
    Last Post: 2005-11-22, 03:09 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •