Hi,
I have a blob field (memo, not compressed) in table1 having a value.
How can I get a blob value from table1 to table2 blob field in NAV 2016? Table2 blob field is having the same field number like in table1.
I have tried for instance several tricks like transferfields, calcfields, createinstream, createoutstream, copystream functions and so on.
If I for example execute calcfields for table1 blob field it empties a blob value from memory.
Pls give a short example how I can do that in NAV 2016 if you have any. Thanks in advance!
0
Answers
in fact you can simply assign one Blob to another. Before using CALCFIELDS() on the source, make sure it is actually a record inside a recordset. If it is only an instance (not added to dataset through INSERT()/MODIFY()), do not use CALCFIELDS().
Carsten
==> How To Ask Questions The Smart Way
This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
I tried to assign a blob value but it does not work.
Here's a code sample I used:
Carsten
==> How To Ask Questions The Smart Way
This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
SilverX: I checked already a page you mentioned and tried with all code examples with no luck.
Carsten
==> How To Ask Questions The Smart Way
This post is my own opinion and does not necessarily reflect the opinion or view of my employer.
Probably you have a problem somewhere else in the code.
To check if your Blob-field has a value, use the following code:
If you don't get a 'Yes' in the end, the problem is somewhere else.
Good luck.
-> Source has value all the time but the destination doesn't.
HannesHolst: First CALCFIELDS for Blob1 clears the value of Blob1. If I run the code without calcfield for blob1 field, it has value all the time but blob2 does'nt even if calcfields are executed for blob2 after insert.
You have to reveal the truth and post your actual code :-)
CALCFIELDS for a Blob is OK.
It's used by NAV-standard also. Check the screenshot.
Calcfields empties blobfield InternalMsg. My intention is to assign InternalMsg blob field value from Service Header to Service Shipment Header that will end up to database table in INSERT.
I do not have a database to test Service Header posting, so, I'm guessing:
The function "PrepareShipmentHeader" is used in CU 5980 only and the "ServShptHeader" is a temporary record-variable.
The actual creation of the Posted Shipment Header takes place in function "CreatePostedShptHeader" of CU 5763.
In "CreatePostedShptHeader" each field is assigned line by line.
Try to add the new field in "CreatePostedShptHeader".
Cheers,
Instead, I added my code to CU5899 to funtion FinalizeShipmentDocument where the actual insert is done into Service Shipment Header table with rec variable PServShptHeader and it now works nicely.