Implement the logic for convert
"container field" data bounded value into the base64 string during
the data export.
Table Field -> ConImage
Data Entity Field ->
Create two new unmapped field as
ConImageStr
Method: Data entity methods -> POST LOAD
//Export - start
//Post load to export data container information to str
if (this.ConImage)
{
container conValue;
str containerAsString;
conValue= this.ConImage;
containerAsString = con2base64str(conValue);
this.ConImageStr = containerAsString;
}
//Export - End
//Import code - start
//Use method -> defaultRow()
str containerAsString;
Container conValue;
containerAsString
= this.ConImageStr;
conValue= base64str2con(containerAsString);
this.ConImage= conValue;
//Import code - End
In the case of a container with binary content, add one more string field to the staging table, for exporting the Memo field.
The field should extends FileName EDT
Field name: conImageStrFileName
Implement data entity method
public
static container getFieldsToBeConvertedToFile()
{
return [fieldstr(<EntityName>, ConImageStr),
fieldstr(<StagingTableName>, ConImageStr),
fieldstr(<StagingTableName>, ConImageStrFileName),
true];
}
Create export project and export now
Download package
Unzip package file
Resource folder with all container contents exported as separate files.
No comments:
Post a Comment