Results 1 to 8 of 8

Thread: Relationship between modules

  1. #1
    jmcalderond is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    Sugar, Hell
    Posts
    113

    Question Relationship between modules

    Hi,

    Got an example:
    I have a module called vehicles and it is related to the accounts module,
    I create vehicles for every existing account and that's ok because I go to
    the vehicles subpanel in the accounts module and can create new vehicles
    whenever I need to using the new button, and after being created they appear
    listed in this subpanel; now, the fact is that when I have to create a new vehicle, but
    creating it by duplicating an existing one on any account, I have to click on the vehicle
    I want to duplicate; up to this point of the procedure, I can see the account to where
    this vehicle is related to, but after I duplicate it and make the required changes and
    then save it, I find that the new vehicle created isn't related to the original account to
    where the original vehicle was related to, in fact, it isn't related to any account. The
    question is, how could I set this way of creating new vehicles to relate the new created
    vehicle to the same account of the original one after that process is completed?, I also
    wonder if the way it actually works has a reason for working that way. Another question...,
    could it be set to relate the new vehicle or not to the original account with a checkbox selection
    done by the user?, so that I can do this creation of new vehicles with vehicles from different
    accounts and then relate them to the correct account?

    I hope I made my issue clear for all of you guys!!!!

    Thank you for all of your suggestions and comments!!!

    Juan Miguel

  2. #2
    ruchida's Avatar
    ruchida is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Feb 2005
    Location
    Japan
    Posts
    1,375

    Default Re: Relationship between modules

    Hi

    How did you develop the vehicles module? Did you use Module Builder or develop it by yourself? Which version of SugarCRM are you running?
    Ryuhei Uchida
    Help Forum Moderator
    Calendar 2.0
    http://blogs.itmedia.co.jp/ruchida/

  3. #3
    scheinarts is offline Sugar Community Member
    Join Date
    Feb 2007
    Location
    Panama City, Panama
    Posts
    151

    Default Re: Relationship between modules

    not sure what your problem is because while looking at an Account records, from the vehicles sub-panel you can just "Select" any existing vehicle that you previously created in the Vehicles module, and vice versa.

    and it is not clear what you mean by using a check field. By default, custom check fields you create in Studio only hold boolean values ( yes or no ) so would have to develop your own custom field ( actually write the code ) to handle any custom process you idealize.

    There is Relate field that you create in Studio, but not sure if that will do what you need.

    Saludos desde Panama!

  4. #4
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: Relationship between modules

    Quote Originally Posted by jmcalderond
    Hi,

    Got an example:
    I have a module called vehicles and it is related to the accounts module,
    I create vehicles for every existing account and that's ok because I go to
    the vehicles subpanel in the accounts module and can create new vehicles
    whenever I need to using the new button, and after being created they appear
    listed in this subpanel; now, the fact is that when I have to create a new vehicle, but
    creating it by duplicating an existing one on any account, I have to click on the vehicle
    I want to duplicate; up to this point of the procedure, I can see the account to where
    this vehicle is related to, but after I duplicate it and make the required changes and
    then save it, I find that the new vehicle created isn't related to the original account to
    where the original vehicle was related to, in fact, it isn't related to any account. The
    question is, how could I set this way of creating new vehicles to relate the new created
    vehicle to the same account of the original one after that process is completed?, I also
    wonder if the way it actually works has a reason for working that way.
    Hi Juan Miguel,
    it's quite a simple answer: duplicating a vehicle does not duplicate its relationships with accounts.
    Another question...,
    could it be set to relate the new vehicle or not to the original account with a checkbox selection
    done by the user?, so that I can do this creation of new vehicles with vehicles from different
    accounts and then relate them to the correct account?
    Understood what you mean, and maybe it can be accomplished somehow, just I'm not sure how
    Last edited by DragonflyMaster; 2008-05-09 at 02:19 PM.
    What do you think the cookie monster eats ?

  5. #5
    jmcalderond is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    Sugar, Hell
    Posts
    113

    Smile Re: Relationship between modules

    Hi guys,

    ruchida, I'm using version 5.0.0a and yes the module was created by using the module builder.

    about what DragonflyMaster said:
    "duplicating a vehicle does not duplicate its relationships with accounts.", that makes sense because that
    way I feel I'm kind of free to select any account I want my record to be related to, that's ok but my idea
    is to make it work the other way.

    scheinarts, about the check field, I think it envolves much more things to do to make it work the way I
    was thinking, I mean, I'll have to write some code as you say, so the check field option is descarted; but
    yesterday I added the account field to the edit view, and there, in edit view, I can select the account where
    I want the vehicle to be related to; now, here I have two questions to make:

    1. Why is it that even when I save the record after editing it, the vehicle does not get the relation with the
    account I choose?, and I still have to relate the vehicle to the account manually!!, how can I make it work
    that way when I save the record?, Am I missing something here??

    2. How can I see the account name fed into the account field I added for the edit view when I duplicate a
    vehicle?, so that I don't always have to be selecting the account name for that vehicle!!

    Thank you for all your support people, it's always been a great help!!!!

    Juan Miguel

  6. #6
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: Relationship between modules

    Hi Juan Miguel,
    not that it's going to answer your questions, but I suggest you to update to 5.0.0d, at least you get rid of old bugs...
    What do you think the cookie monster eats ?

  7. #7
    francisco.daza is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    45

    Default Re: Relationship between modules

    Hi again,

    I'm looking forward to upgrade to the 5.0.0d version, but I don't think this is the solution
    to what I want to do. I just need to know how can I save a vehicle keeping the relation
    to the account I choose when I duplicate it instead of doing that manually all the time.

    Juan Miguel

  8. #8
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: Relationship between modules

    Quote Originally Posted by francisco.daza
    Hi again,

    I'm looking forward to upgrade to the 5.0.0d version, but I don't think this is the solution
    to what I want to do. I just need to know how can I save a vehicle keeping the relation
    to the account I choose when I duplicate it instead of doing that manually all the time.

    Juan Miguel
    I know that's not the solution.
    And as I answered previously, cloning a field does not clone its relationships and I don't know that could be done...
    What do you think the cookie monster eats ?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. upgraded to 4.5.1e, received "Metadata for table tracker does not exist"
    By sfgeorge in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2007-09-03, 02:24 PM
  2. problemi step 6 di SugarSuite-Full-4.0.1h
    By lucia in forum Italiano
    Replies: 0
    Last Post: 2006-12-27, 08:50 AM
  3. Asterisk Patch 1.1.0 Crash on logon
    By skyracer in forum Help
    Replies: 6
    Last Post: 2006-07-08, 06:30 AM
  4. Replies: 7
    Last Post: 2006-06-06, 07:56 PM
  5. 4.0.1 Installation Problem
    By clawton in forum Help
    Replies: 14
    Last Post: 2006-02-13, 04:17 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
  •