Results 1 to 3 of 3

Thread: Change module type after created?

  1. #1
    dante2010 is offline Member
    Join Date
    Feb 2009
    Posts
    17

    Default Change module type after created?

    Hi,

    I have created a custom module of type "person" and added all my fields / layouts setup the way I want.

    I now want to add a file field to allow file uploads within the module. I'm being told that I should have created my module of type "file" in order to do this.

    Is there a way to change my current module to type "file"? I don't really want to have to rebuild it all from scratch just for the sake of being able to have a file upload field!

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Change module type after created?

    I haven't tried this yet so backup your files first and database. Open the custom module's vardefs file and on the last line change "basic" to "file". Now go to Admin->Repair/Rebuild and run it against that custom module so that it adds/removes the necessary columns to make it a file type table.

    You'll also have to change YOURMODULE_sugar.php so that it extends File instead of Basic. Change the fields in that file to match the new type as well. There may be more...

    Usually, once you've built a module it's pretty fast the second time through to just rebuild it from scratch so if it comes down to it there's always that option. Personally, I'd go that route and have in the past.

    Good luck!

  3. #3
    layman99's Avatar
    layman99 is offline Senior Member
    Join Date
    Jan 2011
    Location
    Shimla
    Posts
    82

    Default Re: Change module type after created?

    Quote Originally Posted by eggsurplus View Post
    I haven't tried this yet so backup your files first and database. Open the custom module's vardefs file and on the last line change "basic" to "file". Now go to Admin->Repair/Rebuild and run it against that custom module so that it adds/removes the necessary columns to make it a file type table.

    You'll also have to change YOURMODULE_sugar.php so that it extends File instead of Basic. Change the fields in that file to match the new type as well. There may be more...

    Usually, once you've built a module it's pretty fast the second time through to just rebuild it from scratch so if it comes down to it there's always that option. Personally, I'd go that route and have in the past.

    Good luck!
    Hello eggsurplus,

    All the details u have provided is very helpful and i am getting 90% of whole but while editing the record i am not able to do so because no browse button is being visible to me... pls help me out dear.....

    For more details pls visit my link on forum----
    http://www.sugarcrm.com/forums/showt...583#post247583
    Dinesh Joshi
    sugarcrm CE 6.1.0
    joshishimla99@gmail.com

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 2011-04-06, 03:51 PM
  2. Replies: 1
    Last Post: 2009-07-13, 10:37 AM
  3. Replies: 2
    Last Post: 2008-10-15, 12:04 PM
  4. How to change the type of a field?
    By ywingate in forum Help
    Replies: 6
    Last Post: 2008-08-14, 01:55 PM
  5. How can I change font type ?
    By shamloo in forum Feature Requests
    Replies: 1
    Last Post: 2007-12-19, 05:00 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
  •