-
Display Namesinergiacrm
-
Member SinceJuly 3rd, 2020
-
Last SeenAugust 5th, 2024
sinergiacrm does not have any add-ons for sale.
-
Support August 5th, 2024 @ 10:11 am
Hi,
regarding the new permission for select button, can you let us know if there has been any progress or if it is still planned to be implemented?
Thanks!
View Comment
-
Support July 7th, 2020 @ 8:07 am
Disregard my last messages. It is working fine now.
I wasn't including the dummy picture in the template. I fully understood it when I read the spanish documentation that explains it a bit more detailed.
Thanks for your help.
View Comment
-
Support July 6th, 2020 @ 10:38 pm
When [XX.cf_image_file_path] is used, it shows the image path "document_templates/id_of_the_image.extension"
When [XX.cf_image_file_path;ope=changepic;default=current;adjust] is used, it also shows the same image path. In some test using this option, it doesn't generates the document and shows this error:
TinyButStrong Error : TBS is not able to merge the field [a.cf_image_file_path;ope=changepic;default=current;adjust] because the entity targeted by parameter 'att' cannot be found.
TinyButStrong Error Show() Method: The output is cancelled by the OpenTBS plugin because at least one error has occured.
Although I hope it has something to do with text format and usage of LibreOffice.
What can we do next?
Thanks a lot. Hope we are closer.
View Comment
-
Support July 6th, 2020 @ 5:42 pm
Hi,
Thanks for the quick reply.
I have the following custom code for the field fotografia_c in Contacts module. But still not working:
/////////////////////////////////////////////////////////////////////////////////////////////////// protected function SetCalcFieldsDefs() { global $app_strings; $this->CalcFieldsDefs['image_file_path'] = array ( 'name' => 'image_file_path', 'vname' => $this->translate('LBL_IMAGE_FILE_PATH', 'DHA_PlantillasDocumentos'), 'type' => 'image_path', 'help' => 'Attached image path (only if attached file type is image)', ); } /////////////////////////////////////////////////////////////////////////////////////////////////// function CalcFields() { parent::CalcFields(); $this->SetCalcValue('image_file_path', $this->get_image_path()); } /////////////////////////////////////////////////////////////////////////////////////////////////// protected function get_image_path() { global $sugar_config; $image_path = ''; $image_path_original = ''; $mime_types = array("image/jpeg", "image/gif", "image/png", "image/tiff", "image/pjpeg", "image/x-png", "image/x-tiff"); $mime_type = strtolower("image/jpeg"); $id = $this->bean->fotografia_c; if (!in_array($mime_type, $mime_types)) { return ''; } $image_path_original = "upload://{$id}"; $templates_dir = $sugar_config['DHA_templates_dir']; $templates_dir = $this->Generate_Document_Instance->includeTrailingCharacter ($templates_dir, '/'); if (!file_exists($templates_dir)) { return ''; } $image_ext = ''; if ($mime_type == "image/jpeg" || $mime_type == "image/pjpeg") $image_ext = 'jpg'; elseif ($mime_type == "image/gif") $image_ext = 'gif'; elseif ($mime_type == "image/png" || $mime_type == "image/x-png") $image_ext = 'png'; elseif ($mime_type == "image/tiff" || $mime_type == "image/x-tiff") $image_ext = 'tiff'; $image_path = $templates_dir . $id . '.' . $image_ext; if (copy ($image_path_original, $image_path)) { // $this->Generate_Document_Instance->temp_files[] = $image_path; // esto es para que se borre automaticamente la imagen temporal cuando ya se ha generado el documento return $image_path; } else { return ''; } }
Any thought?
Thanks for your help
View Comment
-
Support July 3rd, 2020 @ 8:01 pm
Hi,
The calculated field cf_image_file_path doesn't appear by the default in the User module. We tried to add it manually in the file "modules/DHA_PlantillasDocumentos/DHA_DocumentTemplatesCalculatedFields_base.php" . It does appear properly in the fields list. we add the config properties: ";ope=changepic;default=current;adjust" in the template, BUT the generated document only contains the file path, it doesn't display the image.
Any thought?
View Comment
sinergiacrm has not rated any add-ons.
sinergiacrm has not verified any add-ons.
sinergiacrm has not created any Wanted Add-ons.