"ecmservices", 'comment' => 'EcmServices', 'duplicate_merge' => true, 'unified_search' => true, //FIELDS SECTION 'fields' => array( /* STANDARD FIELDS SECTION */ // FK parent id. 'fk_parent_id' => array ( 'name' => 'fk_parent_id', 'type' => 'varchar', 'vname' => 'fk_parent_id', 'source' => 'non-db', ), // WZ parent id. 'wz_parent_id' => array ( 'name' => 'wz_parent_id', 'type' => 'varchar', 'vname' => 'wz_parent_id', 'source' => 'non-db', ), // Id. 'id' => array( 'name' => 'id', 'vname' => 'LBL_ID', 'type' => 'id', 'required' => false, 'reportable' => false, 'comment' => 'Unique identifier', ), // 'name' => array( // 'name' => 'name', // 'vname' => 'LBL_NAME', // 'type' => 'name', // 'required' => false, // 'dbType' => 'varchar', // 'len' => 255, // 'unified_search' => true, // 'comment' => 'The short description of the record contents', // 'massupdate' => true, // 'merge_filter' => 'selected', // ), // Name. 'name' => array( 'name' => 'name', 'vname' => 'LBL_NAME', 'type' => 'enum', 'options' => 'ecmservices_name_dom', 'massupdate' => false, // 'required' => true, ), // Description. 'description' => array( 'type' => 'text', 'name' => 'description', 'vname' => 'LBL_DESCRIPTION', 'comment' => 'Description', 'unified_search' => true, // 'required' => true, ), // Date entered. 'date_entered' => array( 'name' => 'date_entered', 'vname' => 'LBL_DATE_ENTERED', 'type' => 'datetime', 'required' => true, 'comment' => 'Date record created', ), // Date modified. 'date_modified' => array( 'name' => 'date_modified', 'vname' => 'LBL_DATE_MODIFIED', 'type' => 'datetime', 'required' => true, 'comment' => 'Date record last modified', ), // Modified user id. Foreign key. 'modified_user_id' => array( 'name' => 'modified_user_id', 'rname' => 'user_name', 'id_name' => 'modified_user_id', 'vname' => 'LBL_MODIFIED', 'type' => 'assigned_user_name', 'table' => 'modified_user_id_users', 'isnull' => 'false', 'dbType' => 'varchar', 'len' => 36, 'required' => true, 'reportable' => true, 'comment' => 'User who last modified record', ), // Servicer user id. Foreign key. 'servicer_user_id' => array( 'name' => 'servicer_user_id', 'rname' => 'user_name', 'id_name' => 'servicer_user_id', 'vname' => 'LBL_SERVICER_ID', 'type' => 'assigned_user_name', 'table' => 'servicer_user_id_users', 'isnull' => 'false', 'dbType' => 'varchar', 'len' => 36, 'required' => true, 'reportable' => true, 'comment' => 'Servicer', ), // Servicer user name. 'servicer_user_name' => array( 'name' => 'servicer_user_name', 'vname' => 'LBL_SERVICER', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'users', 'id_name' => 'servicer_user_id', 'module' => 'Users', 'duplicate_merge' => 'disabled', 'massupdate' => false, 'required' => true, ), // Assigned user id. Foreign key. 'assigned_user_id' => array( 'name' => 'assigned_user_id', 'rname' => 'user_name', 'id_name' => 'assigned_user_id', 'vname' => 'LBL_ASSIGNED_TO_ID', 'group' => 'assigned_user_name', 'type' => 'relate', 'table' => 'users', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'comment' => 'User ID assigned to record', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), // Assigned user name. 'assigned_user_name' => array( 'name' => 'assigned_user_name', 'vname' => 'LBL_ASSIGNED_TO', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'users', 'id_name' => 'assigned_user_id', 'module' => 'Users', 'duplicate_merge' => 'disabled', 'massupdate' => false, 'required' => true, ), // Created by. 'created_by' => array( 'name' => 'created_by', 'rname' => 'user_name', 'id_name' => 'created_by', 'vname' => 'LBL_CREATED', 'type' => 'assigned_user_name', 'table' => 'created_by_users', 'isnull' => 'false', 'dbType' => 'varchar', 'len' => 36, 'comment' => 'User that created the record', ), // Created by link. 'created_by_link' => array( 'name' => 'created_by_link', 'type' => 'link', 'relationship' => 'ecmservices' . '_created_by', 'vname' => 'LBL_CREATED_BY_USER', 'link_type' => 'one', 'module' => 'Users', 'bean_name' => 'User', 'source' => 'non-db', ), // Modified user link. 'modified_user_link' => array( 'name' => 'modified_user_link', 'type' => 'link', 'relationship' => 'ecmservices' . '_modified_user', 'vname' => 'LBL_MODIFIED_BY_USER', 'link_type' => 'one', 'module' => 'Users', 'bean_name' => 'User', 'source' => 'non-db', ), // Servicer user link. 'servicer_user_link' => array( 'name' => 'servicer_user_link', 'type' => 'link', 'relationship' => 'ecmservices' . '_servicer_user', 'vname' => 'LBL_SERVICER', 'link_type' => 'one', 'module' => 'Users', 'bean_name' => 'User', 'source' => 'non-db', ), // Assigned user link. 'assigned_user_link' => array( 'name' => 'assigned_user_link', 'type' => 'link', 'relationship' => 'ecmservices' . '_assigned_user', 'vname' => 'LBL_ASSIGNED_TO_USER', 'link_type' => 'one', 'module' => 'Users', 'bean_name' => 'User', 'source' => 'non-db', 'duplicate_merge' => 'enabled', 'rname' => 'user_name', 'id_name' => 'assigned_user_id', 'table' => 'users', ), // Deleted. 'deleted' => array( 'name' => 'deleted', 'vname' => 'LBL_DELETED_BY', 'type' => 'bool', 'required' => true, 'reportable' => false, 'comment' => 'Record deletion indicator', ), /* NEW FIELDS SECTION */ // RW stock id. 'stock_id' => array( 'name' => 'stock_id', 'rname' => 'name', 'id_name' => 'stock_id', 'vname' => 'LBL_STOCK_ID', 'group' => 'stock_name', 'type' => 'relate', 'table' => 'ecmstocks', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false, 'required' => false, ), // RW stock name. 'stock_name' => array( 'name' => 'stock_name', 'vname' => 'LBL_STOCK_NAME', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'ecmstocks', 'id_name' => 'stock_id', 'module' => 'EcmStocks', 'duplicate_merge' => 'disabled', 'massupdate' => false, 'required' => false, ), // PW stock id. 'pw_stock_id' => array( 'name' => 'pw_stock_id', 'rname' => 'name', 'id_name' => 'pw_stock_id', 'vname' => 'LBL_PW_STOCK_ID', 'group' => 'pw_stock_name', 'type' => 'relate', 'table' => 'ecmpw_stocks', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false, 'required' => false, ), // PW stock name. 'pw_stock_name' => array( 'name' => 'pw_stock_name', 'vname' => 'LBL_PW_STOCK_NAME', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'ecmstocks', 'id_name' => 'stock_id', 'module' => 'EcmStocks', 'duplicate_merge' => 'disabled', 'massupdate' => false, 'required' => false, ), // Number. 'number' => array( 'name' => 'number', 'vname' => 'LBL_NUMBER', 'type' => 'varchar', 'required_option' => true, 'unified_search' => true, 'required' => true, 'len' => '20', ), // Document no. 'document_no' => array( 'name' => 'document_no', 'vname' => 'LBL_DOCUMENT_NO', 'type' => 'varchar', 'required_option' => true, 'unified_search' => true, 'required' => true, 'len' => '30', ), // Parent type. 'parent_type' => array( 'name' => 'parent_type', 'vname' => 'LBL_PARENT', 'type' => 'varchar', // 'group'=>'parent_name', 'required' => true, 'reportable' => false, 'len' => '25', 'comment' => 'The Sugar object to which the call is related', 'massupdate' => false, ), // Parent id. 'parent_id' => array( 'name' => 'parent_id', 'type' => 'id', 'module' => 'Accounts', 'vname' => 'LBL_PARENT_ID', 'group' => 'parent_name', 'massupdate' => false, 'reportable' => false, 'required' => true, ), // Parent name. 'parent_name' => array( 'name' => 'parent_name', 'parent_type' => 'ecmservices_parent_dom', // 'type_name'=>'parent_type', 'id_name' => 'parent_id', 'vname' => 'LBL_PARENT_NAME', 'type' => 'relate', 'group' => 'parent_name', 'dbtype' => 'varchar', 'len' => '255', // 'source'=>'non-db', 'module' => 'Accounts', 'massupdate' => false, // 'options'=> 'ecmservices_parent_dom', 'required' => true, ), // Type. 'type' => array( 'name' => 'type', 'vname' => 'LBL_TYPE', 'required' => true, 'type' => 'enum', 'options' => 'ecmservices_type_dom', 'massupdate' => false, ), // Status. 'status' => array( 'name' => 'status', 'vname' => 'LBL_STATUS', 'type' => 'enum', 'size' => '3', 'options' => 'ecmservices_status_dom', 'massupdate' => false, ), // repair_status. 'repair_status' => array( 'name' => 'repair_status', 'vname' => 'LBL_REPAIR_STATUS', 'type' => 'enum', 'size' => '3', 'options' => 'ecmservices_repair_status_dom', 'massupdate' => false, ), // Register date. 'register_date' => array( 'name' => 'register_date', 'vname' => 'LBL_REGISTER_DATE', 'type' => 'date', 'reportable' => false, 'showFormats' => true, 'massupdate' => false, 'required' => true, ), // Validtill date. 'validtill_date' => array( 'name' => 'validtill_date', 'vname' => 'LBL_VALIDTILL_DATE', 'type' => 'date', 'reportable' => false, 'showFormats' => true, 'massupdate' => false, 'required' => false, ), // Parent name copy. 'parent_name_copy' => array( 'name' => 'parent_name_copy', 'vname' => 'LBL_PARENT_NAME_COPY', 'type' => 'varchar', 'source' => 'non-db', ), // Parent comment. 'parent_comment' => array( 'type' => 'text', 'name' => 'parent_comment', 'vname' => 'LBL_PARENT_COMMENT', 'comment' => 'Parent comment', 'unified_search' => true, // 'required' => true, ), // Service comment. 'service_comment' => array( 'type' => 'text', 'name' => 'service_comment', 'vname' => 'LBL_SERVICE_COMMENT', 'comment' => 'Service comment', 'unified_search' => true, // 'required' => true, ), // Fault comment. 'fault_comment' => array( 'type' => 'text', 'name' => 'fault_comment', 'vname' => 'LBL_FAULT_COMMENT', 'comment' => 'Fault comment', 'unified_search' => true, // 'required' => true, ), // History. 'history' => array( 'type' => 'text', 'name' => 'history', 'vname' => 'LBL_HISTORY', 'comment' => 'History', ), // Parent contact name. 'parent_contact_name' => array( 'name' => 'parent_contact_name', 'vname' => 'LBL_PARENT_CONTACT_NAME', 'type' => 'varchar', 'len' => '255', 'merge_filter' => 'enabled', ), // Parent contact title. 'parent_contact_title' => array( 'name' => 'parent_contact_title', 'vname' => 'LBL_PARENT_CONTACT_TITLE', 'type' => 'varchar', 'len' => '255', 'merge_filter' => 'enabled', ), // Parent contact phone fax. 'parent_contact_phone_fax' => array( 'name' => 'parent_contact_phone_fax', 'vname' => 'LBL_PARENT_CONTACT_PHONE_FAX', 'type' => 'varchar', 'len' => '25', 'merge_filter' => 'enabled', ), // Parent address street. 'parent_address_street' => array( 'name' => 'parent_address_street', 'vname' => 'LBL_PARENT_ADDRESS_STREET', 'type' => 'varchar', 'len' => '150', 'comment' => 'The street address used for parent address', 'group' => 'parent_address', 'merge_filter' => 'enabled', ), // Parent address city. 'parent_address_city' => array( 'name' => 'parent_address_city', 'vname' => 'LBL_PARENT_ADDRESS_CITY', 'type' => 'varchar', 'len' => '100', 'comment' => 'The city used for parent address', 'group' => 'parent_address', 'merge_filter' => 'enabled', ), // Parent address postalcode. 'parent_address_postalcode' => array( 'name' => 'parent_address_postalcode', 'vname' => 'LBL_PARENT_ADDRESS_POSTALCODE', 'type' => 'varchar', 'len' => '20', 'group' => 'parent_address', 'comment' => 'The postal code used for parent address', 'merge_filter' => 'enabled', ), // Parent address country. 'parent_address_country' => array( 'name' => 'parent_address_country', 'vname' => 'LBL_PARENT_ADDRESS_COUNTRY', 'type' => 'varchar', 'group' => 'parent_address', 'comment' => 'The country used for the parent address', 'merge_filter' => 'enabled', ), // Subtotal (articles + services). 'subtotal' => array( 'name' => 'subtotal', 'vname' => 'LBL_SUBTOTAL', 'type' => 'decimal', 'len' => '15,2', 'required' => true, ), // Total (articles + services). 'total' => array( 'name' => 'total', 'vname' => 'LBL_TOTAL', 'type' => 'decimal', 'len' => '15,2', 'required' => true, ), // Articles subtotal. 'articles_subtotal' => array( 'name' => 'articles_subtotal', 'vname' => 'LBL_ARTICLES_SUBTOTAL', 'type' => 'decimal', 'len' => '15,2', 'required' => true, ), // Articles total. 'articles_total' => array( 'name' => 'articles_total', 'vname' => 'LBL_ARTICLES_TOTAL', 'type' => 'decimal', 'len' => '15,2', 'required' => true, ), // Service subtotal. 'services_subtotal' => array( 'name' => 'services_subtotal', 'vname' => 'LBL_SERVICES_SUBTOTAL', 'type' => 'decimal', 'len' => '15,2', 'required' => true, ), // Services total. 'services_total' => array( 'name' => 'services_total', 'vname' => 'LBL_SERVICES_TOTAL', 'type' => 'decimal', 'len' => '15,2', 'required' => true, ), // Discount. 'discount' => array( 'name' => 'discount', 'vname' => 'LBL_DISCOUNT', 'type' => 'decimal', 'len' => '15,2', 'default' => 0, ), // To vatid. 'to_vatid' => array( 'name' => 'to_vatid', 'vname' => 'LBL_TO_VATID', 'type' => 'varchar', 'len' => 15, 'comment' => 'VAT-ID', ), // Ecmlanguage. 'ecmlanguage' => array( 'name' => 'ecmlanguage', 'vname' => 'LBL_ECMLANGUAGE', 'type' => 'enum', 'options' => 'ecmlanguages_dom', 'required' => true, 'len' => 35, 'massupdate' => false, ), // To is vat free. 'to_is_vat_free' => array( 'massupdate' => false, 'name' => 'to_is_vat_free', 'vname' => 'LBL_TO_IS_VAT_FREE', 'type' => 'bool', 'default' => '0', 'comment' => 'Is vat free?', ), // Header text. 'header_text' => array( 'name' => 'header_text', 'vname' => 'LBL_HEADER_TEXT', 'type' => 'text', ), // Footer text. 'footer_text' => array( 'name' => 'footer_text', 'vname' => 'LBL_FOOTER_TEXT', 'type' => 'text', ), // Ads text. 'ads_text' => array( 'name' => 'ads_text', 'vname' => 'LBL_ADS_TEXT', 'type' => 'text', ), // Template id. 'template_id' => array( 'name' => 'template_id', 'vname' => 'LBL_TEMPLATE_ID', 'type' => 'id', 'required_option' => true, 'required' => true, ), // Template id. 'template_name' => array( 'name' => 'template_name', 'vname' => 'LBL_TEMPLATE_NAME', 'type' => 'varchar', 'len' => '100', 'required_option' => true, 'unified_search' => true, 'required' => true, ), // Contact id. 'contact_id' => array( 'name' => 'contact_id', 'rname' => 'name', 'id_name' => 'contact_id', 'vname' => 'LBL_CONTACT_ID', 'group' => 'contact_name', 'type' => 'relate', 'table' => 'contacts', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => false, 'duplicate_merge' => 'disabled', 'massupdate' => false, ), // Contact name. 'contact_name' => array( 'name' => 'contact_name', 'vname' => 'LBL_CONTACT_NAME', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'contacts', 'id_name' => 'contact_id', 'module' => 'Contacts', 'duplicate_merge' => 'disabled', 'massupdate' => false, 'other_data' => array( 'from_relation' => array( 'module' => 'Accounts', 'rel_name' => 'contacts', 'rel_bean_name' => 'Contact', 'field_id_name' => 'parent_id', 'field_name' => 'parent_name', 'field_id_value' => '', ) ), 'initial_filter_fields' => array( 'account_name' => 'parent_name', ), ), // Accepted. 'accepted' => array( 'massupdate' => false, 'name' => 'accepted', 'vname' => 'LBL_ACCEPTED', 'type' => 'bool', 'default' => '0', ), // Email id. 'email_id' => array( 'name' => 'email_id', 'type' => 'id', 'reportable' => false, ), // Other origin. 'order_origin' => array( 'name' => 'order_origin', 'vname' => 'LBL_ORDER_ORIGIN', 'type' => 'enum', 'options' => 'ecmservices_order_origin_dom', 'required' => false, 'len' => 35, 'massupdate' => false, ), // Currency id. 'currency_id' => array( 'name' => 'currency_id', 'type' => 'enum', 'options' => 'currency_dom', 'label' => 'LBL_CURRENCY', ), // Payment condition id. 'ecmpaymentcondition_id' => array( 'name' => 'ecmpaymentcondition_id', 'rname' => 'name', 'id_name' => 'ecmpaymentcondition_id', 'vname' => 'LBL_PAYMENTCONDITION_ID', 'group' => 'ecmpaymentcondition_name', 'type' => 'relate', 'table' => 'ecmpaymentconditions', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false, ), // Payment condition name. 'ecmpaymentcondition_name' => array( 'name' => 'ecmpaymentcondition_name', 'vname' => 'LBL_PAYMENTCONDITION_NAME', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'ecmpaymentcondition', 'id_name' => 'ecmpaymentcondition_id', 'module' => 'EcmPaymentConditions', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), // Payment condition text. 'ecmpaymentcondition_text' => array( 'name' => 'ecmpaymentcondition_text', 'vname' => 'LBL_PAYMENTCONDITION_TEXT', 'type' => 'text', 'reportable' => false, 'module' => 'EcmPaymentConditions', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), // Delivery condition id. 'ecmdeliverycondition_id' => array( 'name' => 'ecmdeliverycondition_id', 'rname' => 'name', 'id_name' => 'ecmdeliverycondition_id', 'vname' => 'LBL_DELIVERYCONDITION_ID', 'group' => 'ecmdeliverycondition_name', 'type' => 'relate', 'table' => 'ecmdeliveryconditions', 'reportable' => true, 'Importable' => false, 'isnull' => 'false', 'dbType' => 'id', 'audited' => true, 'duplicate_merge' => 'disabled', 'massupdate' => false, ), // Delivery condition name. 'ecmdeliverycondition_name' => array( 'name' => 'ecmdeliverycondition_name', 'vname' => 'LBL_DELIVERYCONDITION_NAME', 'type' => 'relate', 'reportable' => false, 'source' => 'non-db', 'table' => 'ecmdeliverycondition', 'id_name' => 'ecmdeliverycondition_id', 'module' => 'EcmDeliveryConditions', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), // Delivery condition text. 'ecmdeliverycondition_text' => array( 'name' => 'ecmdeliverycondition_text', 'vname' => 'LBL_DELIVERYCONDITION_TEXT', 'type' => 'text', 'reportable' => false, 'module' => 'EcmDeliveryConditions', 'duplicate_merge' => 'disabled', 'massupdate' => false, ), // Show images on offerts. 'show_images_on_offers' => array( 'name' => 'show_images_on_offers', 'vname' => 'LBL_SHOW_IMAGES_ON_OFFERS', 'type' => 'bool', 'massupdate' => false, ), // Pricebook id. 'pricebook_id' => array( 'name' => 'pricebook_id', 'vname' => 'LBL_PRICEBOOK_NAME', 'type' => 'id', ), // Show recipient code. 'show_recipient_code' => array( 'name' => 'show_recipient_code', 'vname' => 'LBL_SHOW_RECIPIENT_CODE', 'type' => 'bool', 'massupdate' => false, ), // Show primary params. 'show_primary_params' => array( 'name' => 'show_primary_params', 'vname' => 'LBL_SHOW_PRIMARY_PARAMS', 'type' => 'bool', 'massupdate' => false, ), // Show adwanced params. 'show_advanced_params' => array( 'name' => 'show_advanced_params', 'vname' => 'LBL_SHOW_ADVANCED_PARAMS', 'type' => 'bool', 'massupdate' => false, ), // To informatons. 'to_informations' => array( 'name' => 'to_informations', 'vname' => 'LBL_TO_INFORMATIONS', 'type' => 'text', 'source' => 'non-db', ), // Items list panel. 'items_list_panel' => array( 'name' => 'items_list_panel', 'vname' => 'LBL_ITEMS', 'type' => 'text', 'source' => 'non-db', ), // Preview panel. 'preview_panel' => array( 'name' => 'preview_panel', 'vname' => 'LBL_PREVIEW', 'type' => 'text', 'source' => 'non-db', ), // Email panel. 'email_panel' => array( 'name' => 'email_panel', 'vname' => 'LBL_EMAILS', 'type' => 'text', 'source' => 'non-db', ), /* FOR SUBPANELS */ // Account. 'account' => array( 'name' => 'account', 'type' => 'link', 'relationship' => 'ecmservices_account', 'source' => 'non-db', 'vname' => 'LBL_ACCOUNTS', ), // Contact. 'contact' => array( 'name' => 'contact', 'type' => 'link', 'relationship' => 'ecmservices_contact', 'source' => 'non-db', 'vname' => 'LBL_CONTACTS', ), // Bugs. 'bugs' => array( 'name' => 'bugs', 'type' => 'link', 'relationship' => 'ecmservices_bug', 'source' => 'non-db', 'vname' => 'LBL_BUGS', ), // Notes. 'notes' => array ( 'name' => 'notes', 'type' => 'link', 'relationship' => 'ecmservice_notes', 'source'=>'non-db', 'vname'=>'LBL_NOTES' ), // Payment invoices. 'ecmprepaymentinvoices' => array( 'name' => 'ecmprepaymentinvoices', 'type' => 'link', 'relationship' => 'ecmservices_ecmprepaymentinvoices', 'source' => 'non-db', 'vname' => 'LBL_ECMPREPAYMENTINVOICES', ), // Emails. 'emails' => array( 'name' => 'emails', 'type' => 'link', 'relationship' => 'ecmservices_emails', 'source' => 'non-db', 'vname' => 'LBL_EMAILS', ), // Tasks. 'tasks' => array( 'name' => 'tasks', 'type' => 'link', 'relationship' => 'ecmservices_task', 'source' => 'non-db', 'vname' => 'LBL_TASKS', ), ), /* INDICES SECTION */ 'indices' => array( array( 'name' => 'ecmservices' . 'pk', 'type' => 'primary', 'fields' => array( 'id', ), ), array( 'name' => 'idx_' . 'ecmservices' . '_name', 'type' => 'index', 'fields' => array( 'name', ), ), ), /* RELATIONSHIPS SECTION */ 'relationships' => array( 'ecmservices' . '_assigned_user' => array( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'EcmServices', 'rhs_table' => 'ecmservices', 'rhs_key' => 'assigned_user_id', 'relationship_type' => 'one-to-many', ), 'ecmservices' . '_modified_user' => array( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'EcmServices', 'rhs_table' => 'ecmservices', 'rhs_key' => 'modified_user_id', 'relationship_type' => 'one-to-many', ), 'ecmservices' . '_servicer_user' => array( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'EcmServices', 'rhs_table' => 'ecmservices', 'rhs_key' => 'servicer_user_id', 'relationship_type' => 'one-to-many', ), 'ecmservices' . '_created_by' => array( 'lhs_module' => 'Users', 'lhs_table' => 'users', 'lhs_key' => 'id', 'rhs_module' => 'EcmServices', 'rhs_table' => 'ecmservices', 'rhs_key' => 'created_by', 'relationship_type' => 'one-to-many', ), 'ecmservices' . '_account' => array( 'lhs_module' => 'Accounts', 'lhs_table' => 'accounts', 'lhs_key' => 'id', 'rhs_module' => 'EcmServicess', 'rhs_table' => 'ecmservices', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many', ), 'ecmservices' . '_contact' => array( 'lhs_module' => 'Contacts', 'lhs_table' => 'contacts', 'lhs_key' => 'id', 'rhs_module' => 'EcmServicess', 'rhs_table' => 'ecmservices', 'rhs_key' => 'contact_id', 'relationship_type' => 'one-to-many', ), 'ecmservices' . '_project' => array( 'lhs_module' => 'Project', 'lhs_table' => 'project', 'lhs_key' => 'id', 'rhs_module' => 'EcmServices', 'rhs_table' => 'ecmservices', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many', ), 'ecmservices' . '_bug' => array( 'lhs_module' => 'Bugs', 'lhs_table' => 'bugs', 'lhs_key' => 'id', 'rhs_module' => 'EcmServices', 'rhs_table' => 'ecmservices', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many', ), 'ecmservices' . '_ecmprepaymentinvoices' => array( 'lhs_module' => 'EcmServices', 'lhs_table' => 'ecmservices', 'lhs_key' => 'id', 'rhs_module' => 'EcmPrepaymentInvoices', 'rhs_table' => 'ecmprepaymentinvoices', 'rhs_key' => 'ecmservice_id', 'relationship_type' => 'one-to-many', ), 'ecmservices' . '_case' => array( 'lhs_module' => 'Cases', 'lhs_table' => 'cases', 'lhs_key' => 'id', 'rhs_module' => 'EcmServices', 'rhs_table' => 'ecmservices', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many', ), 'ecmservices' . '_task' => array( 'lhs_module' => 'Tasks', 'lhs_table' => 'tasks', 'lhs_key' => 'id', 'rhs_module' => 'EcmServices', 'rhs_table' => 'ecmservices', 'rhs_key' => 'parent_id', 'relationship_type' => 'one-to-many', ), 'ecmservice_notes' => array( 'lhs_module'=> 'EcmServices', 'lhs_table'=> 'ecmservices', 'lhs_key' => 'id', 'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id', 'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type', 'relationship_role_column_value'=>'EcmServices' ), ), /* THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW */ 'optimistic_locking' => true, );