Hi
Does anyone know how to create a field in the the module loader to the documents module, i am trying to create and upload file field
Thanks in Advance
Cheers
Shannon
Hi
Does anyone know how to create a field in the the module loader to the documents module, i am trying to create and upload file field
Thanks in Advance
Cheers
Shannon
Hi, Shannon
I believe you can create a file_upload field as a varchar field and into editviewdefs, add the attribute "type" => 'File'.
It automatically create into EditView a fileupload field with file selector.
I´m not sure it automatically upload the file, but you can try this.
Cheers.
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.
Thanks i will give it a go
Shannon,
Did this work? I am trying to create the same type of field.
Hi I actually ran short of time and worked around my issue another way
Shannon
Hi all,Originally Posted by andopes
I try to do the same thing but unfortunatelly :
- Varchar type doesn't exist anymore for fields (I use SugarCRM CE Version 5.0.0d )
- Into" editview" (from "Module Builder" I think) I don't understand how to add the attribute "type" => 'File'.
Can You give us more details please?![]()
Thanks in advance for answer !
Hi, balthOriginally Posted by balth
You can create a Text field, not text area, it is the same of varchar
Inside the editviewdefs, exactly where you want to render the field you can put this code:
CheersPHP Code:array (
array(
'name'=>'file_upload',
'type'=>'File',
),
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.
Thanks for answer andopes,
but it doesn't work to me....![]()
adding "'type'=>'File', " in my editviewdefs.php doesn't change anything...
And after learning some code from document module (for example), it seem more complicated than just adding "'type'=>'File', " into a file...
Hi all,
Answer to the problem is to edit your vardef.php file in /var/www/your_sugar_dir/modules/your_mod_dir/
Then repair your module (without repairing database) and it's done...PHP Code:'bmfb' => <<MY PERSONAL FIELD
array ( 'required' => false,
'name' => 'bmfb',
'vname' => 'LBL_BMFB',
'type' => 'file', << CHANGE HERE - REPLACE "varchar" BY "file"
'massupdate' => 0,
'comments' => '',
'help' => '',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => 0,
'audited' => 0,
'reportable' => 0,
'len' => '255', ),
![]()
This isn't upgrade safe but the attachment will let you create file custom field types in Studio.
Use only if you're sure of what you're doing on a test environment. Just unzip and copy into Sugar. Based on 5.0.0c.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks