Results 1 to 5 of 5

Thread: Custom Module File based - Editview uplaod again

  1. #1
    aureh12 is offline Sugar Community Member
    Join Date
    Feb 2009
    Posts
    96

    Arrow Custom Module File based - Editview uplaod again

    Dear all.

    I created a custom module based on File.
    When you create a custom file module, Sugar will not create give it the Revision capabilities.

    So my module is now published in my Sugar.

    I create a record, uploading a file.
    But i f i want to update the file, I can't.
    I cannot upload a new file and replace the current outdated file.

    The only way is to delete the record and create a new one with the updated file and create again all the relationship with other module. This is not bearable.

    Do you have a solution ?
    How can I modify the module so I can upload again a file in the EditView and replace the old file ?

    Thanks for your help.

    Sugarcrm 5.2.0j
    Attached Images Attached Images  

  2. #2
    aureh12 is offline Sugar Community Member
    Join Date
    Feb 2009
    Posts
    96

    Smile Re: Custom Module File based - Editview uplaod again

    I think I found the answer.

    I modified the EditView in /custom/modules/MYMODULE/metadata/

    and replace the code:

    PHP Code:
    'customCode' => '{if $fields.id.value!=""}
     {assign var="type" value="hidden"}
     {else}
     {assign var="type" value="file"}
     {/if}
     <input name="uploadfile" type = {$type} size="30" maxlength="" onchange="setvalue(this);" value="{$fields.filename.value}">{$fields.filename.value}'

    by

    PHP Code:
    'customCode' => '{assign var="type" value="file"}
    <input name="uploadfile" type = {$type} size="30" maxlength="" onchange="setvalue(this);" value="{$fields.filename.value}">'

    It is working.

    Can you confirm ot me that it is the right way to do ?

  3. #3
    carlo75 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    86

    Default Re: Custom Module File based - Editview uplaod again

    I try in 5.5.2 CE,
    but there's NO chance to solve this issue, in this way. First you have forget {/if}, second the field now can be editable, but there isn't Browse button and so, you can't upload again a new file.

    Can anyone help us to solve this problem?
    Thanks in advance. regards

  4. #4
    aureh12 is offline Sugar Community Member
    Join Date
    Feb 2009
    Posts
    96

    Default Re: Custom Module File based - Editview uplaod again

    Dear carlo75

    It's working for me on 5.5.2 CE.

    You need to replace the whole custom code.

  5. #5
    carlo75 is offline Senior Member
    Join Date
    Mar 2009
    Posts
    86

    Default Re: Custom Module File based - Editview uplaod again

    Hi aureh12m
    thanks again for your reply, but I can't reproduce in my custom module these path and files. If you want, you can check a problem wih class name here:

    http://www.sugarcrm.com/forums/showthread.php?p=218556

    But don't understand how they solve the problem. Thanks again, regards.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2009-04-17, 12:54 PM
  2. Custom EditView for Accounts module
    By dinudanial in forum Developer Help
    Replies: 6
    Last Post: 2009-03-12, 08:32 AM
  3. Help required for uplaod of 600MB file
    By shivaranjani in forum Help
    Replies: 1
    Last Post: 2008-09-10, 04:29 PM
  4. where is the editview file stored in account module
    By jtan in forum Developer Help
    Replies: 2
    Last Post: 2008-08-14, 04:28 AM
  5. Replies: 0
    Last Post: 2007-11-21, 12:08 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
  •