Results 1 to 7 of 7

Thread: values between modules

  1. #1
    ddfdom is offline Member
    Join Date
    Nov 2009
    Posts
    7

    Default values between modules

    Hi everybody,

    I'm using sugar crm 5.2 CE and I'm searching a very simple function

    I would like the value of the field phone office of the account module to appear in the listview of the contact module

    if somebody has an idea

    and sorry for my bad english

  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: values between modules

    • Create an extended vardefs for Contacts to add the account phone field into Contacts vardefs. This field needs to be a non-db one;
    • Create an extended language to Contacts to set the label of such field;
    • Create a logic_hook process record to fill into this field the appropriate value.


    Cheers
    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.

  3. #3
    ddfdom is offline Member
    Join Date
    Nov 2009
    Posts
    7

    Default Re: values between modules

    thanks andopes for your reply but i'm not very familiar with sugarCRM terms, and your post is like "chinese" for me
    bur i was learning reading the Vardefs Documentation in the WiKi

  4. #4
    mvngti is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    South Africa
    Posts
    510

    Default Re: values between modules

    If you do not know or understand how to create extended vardefs you can also create a custom field.

    Add a custom field to Contacts in Studio - call it account_phone_office
    (This does step 1 and 2 suggested by andopes for you, but will save it to the database)

    Then use the editLogicHooks tool in my signature and create a process_record logic hook on Contacts that contain this

    PHP Code:
    //Retrieve the related account
    require_once "modules/Accounts/Acount.php";
    $account = new Account();
    $account->retrieve($bean->account_id);

    // Set the new field on Contacts from the Account
    $bean->account_phone_office_c $account->phone_office
    (This takes care of step 3)

    Now simple add that field to the subpanel and you're done.

    M
    --


    Marnus van Niekerk

    There are only 10 types of people in the world
    those who can read binary and those who don't

    Modules:
    CE Teams - Upgrade safe teams module for Community Edition
    FieldACL - Field Level Access Control for Community Edition
    EditLogicHooks - Create and edit Logic Hooks from the Admin GUI
    FlexibleChartDashlet - Display any data in a Dashlet Chart
    DocumentThumbnails - Thumbnails for Documents module

    Many questions can be answered by reading the Developers Manual

  5. #5
    ddfdom is offline Member
    Join Date
    Nov 2009
    Posts
    7

    Default Re: values between modules

    Thanks for your reply , it seems ti be really simple i'll go to have a try

  6. #6
    wdroush is offline Senior Member
    Join Date
    Oct 2009
    Posts
    159

    Default Re: values between modules

    dang I've been having a similar issue with listviews and getting custom data, here is what I need!

    Thanks guys!

  7. #7
    naveen2k7 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Chennai, India
    Posts
    110

    Default Re: values between modules

    Hi Marnus van Niekerk,

    Iam using sugarcrm CE 5.5..As per your suggestions.I have installed edit logic hooks successfully.And created the process_record logic hook on Contacts.

    There is one small correction in (require_once "modules/Accounts/Acount.php"; ) change has (require_once "modules/Accounts/Account.php"; )

    And I followed your other steps..Here i needed the phone number entered in accounts edit page..will have to retrieve the phone number display it on contact detail page for that particular account.

    I have tried ur steps..But Accounts phone number is not displaying in contact detail view.How can i solve it..pls help me out..

    Thanks in Advance,
    Naveen

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2009-04-02, 07:42 PM
  2. Why new modules not shown in the Role modules list
    By j.lagos in forum Developer Help
    Replies: 1
    Last Post: 2008-09-22, 12:54 PM
  3. Replies: 0
    Last Post: 2008-02-19, 03:20 PM
  4. Pick Several Values from one row
    By jorgetsilva in forum Developer Help
    Replies: 0
    Last Post: 2006-02-14, 09:46 AM

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
  •