Results 1 to 2 of 2

Thread: Help in building 1st module

  1. #1
    ggould is offline Junior Member
    Join Date
    Mar 2009
    Posts
    2

    Default Help in building 1st module

    Building a new module of specific records that we're going to relate to each of the leads, opportunities and accounts. A couple of fields in the new module needs to count how many leads, opportunities and accounts are associated with each "new module" record. (3 separate fields)

    example:
    [new module record #1]: has 97 accounts that have been associated with it.

    the field called; [# of accounts]: would count 97 - this is being dervied from the # of accounts that were selected from the new look module.

    I hope this makes sense...I'm a new Enterprise client to Sugar and don't know the terminology.

    Thanks, gg

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Help in building 1st module

    Hi gg

    The best approach to do that is to create before_save logic_hook on modules Accounts, Leads, Opportunities, the way it check if the record being saved is assigned to some record of this new module. If yes, then you check how many records from this module are assigned to the same record to whom this Account/Lead/Opportunity is assigned.

    This approach will work like a charm if you always assign Accounts/Leads/Opportunities to this new module through EditView.
    Another good side effect of this approach is: you are able to search by these count fields.

    Best regards
    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.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Module Building
    By prodicalxxi in forum Help
    Replies: 3
    Last Post: 2010-11-03, 07:42 AM
  2. Building a Module, Customisation and exporting
    By chrislynch8 in forum Developer Help
    Replies: 3
    Last Post: 2010-09-16, 01:54 PM
  3. Building Blog Module
    By dhruba.doley in forum Developer Help
    Replies: 0
    Last Post: 2010-06-17, 12:02 PM
  4. Replies: 5
    Last Post: 2009-07-16, 04:26 AM
  5. Building a new module in 4.5f
    By b0bcat2000 in forum General Discussion
    Replies: 5
    Last Post: 2007-02-12, 09:45 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
  •