Skip to content
Snippets Groups Projects
Commit 1e391393 authored by Alan Bell's avatar Alan Bell
Browse files

fix #135 set default values on organisations/contacts/opportunities when converting leads

parent 79c21247
No related branches found
No related tags found
No related merge requests found
......@@ -174,6 +174,12 @@ function vtws_populateConvertLeadEntities($entityvalue, $entity, $entityHandler,
$entityFields = $entityHandler->getMeta()->getModuleFields();
$row = $adb->fetch_array($result);
$count = 1;
foreach ($entityFields as $fieldname=>$field){
$defaultvalue=$field->getDefault();
if($defaultvalue){
$entity[$fieldname]=$defaultvalue;
}
}
do {
$entityField = vtws_getFieldfromFieldId($row[$column], $entityFields);
if ($entityField == null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment