local procedure ConverBase64Text(FileContent: text)
var
BaseConvert: Codeunit "Base64 Convert";
TempBlob: Codeunit "Temp Blob";
OutStr: OutStream;
RecRef: RecordRef;
begin
if FileContent = '' then
exit;
RecRef.Open(Database::<TargetTable>);
RecRef.GetTable(<TargetTable>);
TempBlob.CreateOutStream(OutStr);
BaseConvert.FromBase64(FileContent, OutStr);
TempBlob.ToRecordRef(RecRef, <TargetTable>.FieldNo(<BlobField>));
RecRef.SetTable(<TargetTable>);
RecRef.Close();
end;
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,214 Most Valuable Professional
nmaenpaa 101,156