We want to upload a quotes or document direct in opportunities form. I know we can add though history panel as Create note or attachment but i need on upload field on opportunities oppcreating time. Pls help me
Which version / flavor ? What do you call a quote/document ? Is it a real file, only ? Do you need additional data ? Do you want, in a future, add more than ONE file ?
SugarCRM provides a fieldtype for this : file. Just add the field by custom safe way: custom/Extension/modules/(your module)/Ext/Vardefs/(your field).php and declare it as "file" type. There is some examples from Notes module for additional config (ability to remove attachement for example), take a look on it.
On rebuild & repair, and voilà ! Field is usable, and you can add it by Studio.
Please double-check what I said ;) . Creating the field is only the first step. You have to add it (by Studio, or manually; but if you do it manually, you'll have additional details to provide to editviewdefs for the form enctype attribute) on editview and eventually on detailview, depending to what you want to see.
And be care : fields created manually should NOT be suffixed by the "_c" crappy thing. That's for studio fields only.
Keep in mind to check on Note module : it will provide you some good examples on how to add and manage a File field.
Thanks for reply.. I have added text field from studio in opportunities module and added in layout. After then i change it type $dictionary['Opportunity']['fields']['filename_c']['type']='file'; in sugarfield_filename_c.php. Its display correct file browse button on time of Opportunities. But document is not getting upload. What other things i need to, Pls help.