Results 1 to 6 of 6

Thread: How to link a document to a case?

  1. #1
    marco.rizzetto is offline Sugar Community Member
    Join Date
    Oct 2005
    Posts
    29

    Question How to link a document to a case?

    I've installed Sugarcrm 4.2.1a and this is by far the best CRM package that I have seen for free Thanks a lot folks for building such a sweet product.
    Now I have this problem:
    I am not a php expert and I would find a way to link the Documents uploaded to a particular case.
    I hope that someone can help me
    Thanks
    MArco

  2. #2
    simple is offline Sugar Community Member
    Join Date
    Jul 2005
    Posts
    259

    Default Re: How to link a document to a case?

    You can add documents (attachments) to a case by creating a note (show detail view of the case and click on create note on the corresponding subpanel).

    But linking documents from the document module to cases is not possible.

  3. #3
    marco.rizzetto is offline Sugar Community Member
    Join Date
    Oct 2005
    Posts
    29

    Question Re: How to link a document to a case?

    What modifications must I do to Sugar if I would have this feature?
    Thanks
    Marco
    Last edited by marco.rizzetto; 2006-09-06 at 02:58 PM.

  4. #4
    simple is offline Sugar Community Member
    Join Date
    Jul 2005
    Posts
    259

    Default Re: How to link a document to a case?

    I think that you have to add entries to the vardefs.php file and add entries in the relationship table. But I'm not sure if this is all you have to do.

    Check how the contract-document relationship works.

    modules/Documents/vardefs.php

    PHP Code:
      'contracts' => array (
            
    'name' => 'contracts',
            
    'type' => 'link',
            
    'relationship' => 'contracts_documents',
            
    'source' => 'non-db',
            
    'vname' => 'LBL_CONTRACTS',
      ), 
    modules/Contracts/vardefs.php

    PHP Code:
                      'documents' =>  array (
                            
    'name' => 'documents',
                            
    'type' => 'link',
                            
    'relationship' => 'contracts_documents',
                            
    'source' => 'non-db',
                            
    'vname' => 'LBL_DOCUMENTS',
                    ), 

    And in the database table relationships is an entry for "contracts_documents".

  5. #5
    marco.rizzetto is offline Sugar Community Member
    Join Date
    Oct 2005
    Posts
    29

    Default Re: How to link a document to a case?

    I have done these modifications but I don't see differences.
    Maybe .... Must I change the \Contacts\layout_defs.php ?
    Marco
    Last edited by marco.rizzetto; 2006-09-06 at 04:24 PM.

  6. #6
    Scott_Savage is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    Sydney, Australia
    Posts
    193

    Default Re: How to link a document to a case?

    Anyone else got some ideas for this? It seems some of the code is already there with the linking to contracts, however I think maybe this is functionality only in the pro versions? Not sure...

    I am thinking the database also needs to be modified, with at least the parent_id and parent_type fields added to the document table and the appropriate fields added to editview etc. Anything else? Is there an easy way anyone has found to do this?

    Thanks!!!
    Web Server: IIS 6, Win2k3
    PHP: 5.2.5
    MySQL: 5.0.27-community-nt
    Sugar: 4.5.0j Open Source
    Website: www.scottsavage.net

Thread Information

Users Browsing this Thread

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

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
  •