~~NOTOC~~ ====== Business Mapping:: Contacts2Accounts ====== ---- dataentry ---- name : Contacts2Accounts type : businessmapping bmtype : Field Mapping description_wiki: Convert a Contact into an Account keywords_tags : contact,account,conversion version : 1.0 release_dt : 2016-05-01 licenses : MPL price : Free distribution : Free authorname : JPL TSolucio, S.L. authoremail_mail : info(at)tsolucio(dot)com supportemail_mail : info(at)tsolucio(dot)com ---- \\ 4 Contacts 6 Accounts accountname firstname 778 lastname 778 accounttype Customer CONST phone phone 778 fax fax 778 otherphone otherphone 778 email1 email 778 email2 secondaryemail 778 emailoptout emailoptout 778 notify_owner notify_owner 778 bill_street mailingstreet 778 bill_city mailingcity 778 bill_state mailingstate 778 bill_code mailingzip 778 bill_country mailingcountry 778 bill_pobox mailingpobox 778 ship_street otherstreet 778 ship_city othercity 778 ship_state otherstate 778 ship_code otherzip 778 ship_country othercountry 778 ship_pobox otherpobox 778 description description 778 converted_from record_id 778 This script will add the "converted from" field present in the mapping and the action link on Contacts. name = 'converted_from'; $field->label= 'Converted From'; $field->table = $module->basetable; $field->column = 'converted_from'; $field->columntype = 'INT(11)'; $field->uitype = 10; $field->displaytype = 1; $field->typeofdata = 'I~O'; $field->presence = 0; $blockInstance->addField($field); $field->setRelatedModules(Array('Contacts')); echo "
Added Field to ".$module->name." module.
"; } else { echo "Failed to find ".$module->name." block
"; } } else { echo "Failed to find ".$module->name." module.
"; } $module = Vtiger_Module::getInstance('Contacts'); if($module) { $module->addLink('DETAILVIEWBASIC','Convert to Account','index.php?module=Accounts&action=EditView&cbfromid=$RECORD$'); } else { echo "Failed to find ".$module->name." module.
"; } ?>