Results 1 to 2 of 2

Thread: relationship not shows in Detail/Edit view

  1. #1
    zaska's Avatar
    zaska is offline Senior Member
    Join Date
    Sep 2008
    Posts
    99

    Question relationship not shows in Detail/Edit view (solved)

    Hi

    I have a custom module created with the "Module Builder" related to "Accounts" and I want to select that relationship in the Edit view. In vardefs:

    Code:
      'account_name' =>
      array (
        'name' => 'account_name',
        'rname' => 'name',
        'id_name' => 'account_id',
        'vname' => 'LBL_ACCOUNT_NAME',
        'join_name' => 'accounts',
        'type' => 'relate',
        'link' => 'accounts',
        'table' => 'accounts',
        'isnull' => 'true',
        'module' => 'Accounts',
        'dbType' => 'varchar',
        'len' => '255',
        'source' => 'non-db',
        'unified_search' => true,
      ),
      'account_id' =>
      array (
        'name' => 'account_id',
        'rname' => 'id',
        'id_name' => 'account_id',
        'vname' => 'LBL_ACCOUNT_ID',
        'type' => 'relate',
        'table' => 'accounts',
        'isnull' => 'true',
        'module' => 'Accounts',
        'dbType' => 'id',
        'reportable' => false,
        'source' => 'non-db',
        'massupdate' => false,
        'duplicate_merge' => 'disabled',
        'hideacl' => true,
      ),
    MyModule_sugar.php:
    Code:
       
                 var $account_name;
                 var $account_id;
    
    var $relationship_fields = Array('account_id'=> 'accounts');
    language/en_us.lang:
    Code:
      'LBL_ACCOUNT_NAME' => 'Account Name:',
      'LBL_ACCOUNT_ID' => 'Account ID:',
    When creating a new entry in my custom module "Account Name" is there and when save it the relationship is correct. But in Detail view "Account Name" is empty. When editing this entry it is also blank and when select some other account it creates the new relationship. How to view/fetch that relationship in detail view and edit view?

    SugarCRM Version 5.0.0g (Build 3391)
    Last edited by zaska; 2008-10-06 at 01:55 PM. Reason: solved

  2. #2
    zaska's Avatar
    zaska is offline Senior Member
    Join Date
    Sep 2008
    Posts
    99

    Default Re: relationship not shows in Detail/Edit view

    fixed it
    Just added the functions fill_in_additional_detail_fields() and get_account_detail($id) into modules/MyModule/MyModule_sugar.php

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
  •