I'm trying to pass files already loaded from a file field to another field through a BPM.
When both fields are file fields t(https://docs.espocrm.com/administration/fields/#file), there is no problem. I do it like this:
originField is a File field
destinationField is a File field
The problem appears when I move from a File field to a Attachment-Multiple field (https://docs.espocrm.com/administrat...hment-multiple). In this case the Ids of the files is an array. Si I managed it this way:
originField is a File field
destinationField is an Attachment-Multiple field
The problem is that, once executed, I don't find the files in destinationField.
I made the same test the other way round. Moving from a Attachment-Multiple field to a File field
originField is an Attachment-Multiple field
destinationField is a File field
In this case, it works perfectly.
Thank is advance for your help.
Note:
There are no limitations defined neither on the Max File Size nor the file types that can be accepted.
The testing has been made with pdf files sized around 400Kb.
When both fields are file fields t(https://docs.espocrm.com/administration/fields/#file), there is no problem. I do it like this:
originField is a File field
destinationField is a File field
$prFileId = originFieldId;
destinationFieldId = $prFileId;
destinationFieldId = $prFileId;
The problem appears when I move from a File field to a Attachment-Multiple field (https://docs.espocrm.com/administrat...hment-multiple). In this case the Ids of the files is an array. Si I managed it this way:
originField is a File field
destinationField is an Attachment-Multiple field
$prSeveralFileIds = list();
$prFileId = originFieldId;
$prSeveralFileIds = array\push($prSeveralFileIds, $prFileId);
destinationFieldsIds = $prSeveralFileIds;
$prFileId = originFieldId;
$prSeveralFileIds = array\push($prSeveralFileIds, $prFileId);
destinationFieldsIds = $prSeveralFileIds;
The problem is that, once executed, I don't find the files in destinationField.
I made the same test the other way round. Moving from a Attachment-Multiple field to a File field
originField is an Attachment-Multiple field
destinationField is a File field
$prSeveralFileIds = originFieldIds;
$prFileId = array\at($prSeveralFileIds, 0);
destinationFieldId = $prFileId;
$prFileId = array\at($prSeveralFileIds, 0);
destinationFieldId = $prFileId;
In this case, it works perfectly.
Thank is advance for your help.
Note:
There are no limitations defined neither on the Max File Size nor the file types that can be accepted.
The testing has been made with pdf files sized around 400Kb.
Comment