I'm looking to create an ''attachment'' field in a module. Same thing as the field ''File Name'' in the ''Documents'' module.
How can I do that?
Thanks
I'm looking to create an ''attachment'' field in a module. Same thing as the field ''File Name'' in the ''Documents'' module.
How can I do that?
Thanks
Hello Dave,
This was tested in Sugar 7.6.1.0 Professional:
1. Login as a System Administrator.
2. Navigate to Admin > Studio > {Sidecar Module such as Accounts} > Fields.
3. Click 'Add Field'.
4. Create a new TextField type field and add it to the Record View.
5. In the Sugar File System, locate the following file:
./custom/Extension/modules/{Module}/Ext/Vardefs/sugarfield_{Field Name}.php
6. Modify this file and add the following line, making the necessary adjustments:
$dictionary['Account']['fields']['{Field Name}']['type']='file';
7. Return to the Sugar application and navigate to Admin > Repair.
8. Select 'Quick Repair and Rebuild'.
When you create or edit a record in the module where you added the field, it will now display and behave as a File type field that allows you to upload attachments.
Regards,
Dan Kallish
Advanced Support Engineer
SUGARCRM
Learning Resources: http://support.sugarcrm.com | http://university.sugarcrm.com | http://community.sugarcrm.com
Hi Dan.
Thanks for a very thorough explanation. It´s all working until I try to open an already saved attachment in Sugar. The attachment does not keep it´s original name and extension. Instead, it gets a new name, like 315d4014-283d-a1a2-c1a1-572a839cf531, see pic:
Any idea how that can be fixed (apart from manual renaming)?
Lori Arce - do you know?
Thanks again,
KGM
Hi Dan Kallish
I have used the similar procedure and was able to upload the file in Tasks module.
But facing issue while deleting file
In console i have chekced and found this.
jquery.min.js:4 DELETE http://<url>/rest/v10/Tasks/50cfb408-0856-11e6-a18a-fa163e8c8e90/file/attachment_c?delete_if_fails=true&platform=base 404 (Not Found)
Can you please update me regarding this.
Regards
Sidhu
Hello Sindhu,
Hope this will helps.
Creating a File Upload Field for a Core Module/Custom Module in Sugar 7.x - Bhea Blog
Best Regards,
Vignesh V
Hi Sidhu,
Can you please tell me how did you solve this problem? I'm working in sugar 8.3.
Hi Sidhu,
Can you please tell me how did you solve this problem? I'm working in sugar 8.3.