2017-01-12 13 views

答えて

0

残念ながら、この時点でStudioを使用してこれを達成する方法はありません。 Sugarのサイトでは、正式に文書化された記事はありません。しかし、あなたがSugarコミュニティを検索した場合、Sugarコミュニティでコードを使用することについて、たくさんの投稿があります。彼らはTrackers(特にidフィールド)のような特定の場所でこのメタデータを使用しています。

カスタム/拡張を/モジュール/機会/内線/​​ Vardefs/your_filename.php

:あなたは次の場所にある(名前は関係ありません)ファイルにこのコードを配置することによって、拡張フレームワークを通じて、このロジックを利用することができます
<?php 
$dictionary['Opportunity']['fields']['your_autoincrement_field'] = array (
    'required' => true, 
    'name' => 'your_autoincrement_field', 
    'vname' => 'LBL_YOUR_AUTOINCREMENT_FIELD', 
    'type' => 'int', 
    'massupdate' => 0, 
    'comments' => 'Automatically generated number field', 
    'help' => 'User friendly description of field', 
    'importable' => 'true', 
    'duplicate_merge' => 'disabled', 
    'duplicate_merge_dom_value' => '0', 
    'audited' => false, 
    'reportable' => true, 
    'calculated' => false, 
    'auto_increment'=> true, 
); 
$dictionary['Opportunity']['indices']['your_autoincrement_field'] = array(
    'name' => 'your_autoincrement_field', 
    'type' => 'unique', 
    'fields' => array(
     'your_autoincrement_field' 
    ), 
); 
?> 

"your_autoincrement_field"を自由に置き換えてください。

その後、Admin> Repair> Quick Repair and Rebuildに進みます。それが完了したら、フィールドは表示され、レイアウトに配置できるようになります。

関連する問題