This could be helpful
(using EPiServer.Commerce. version=13.30.0)
After adding a new meta field to our purchaseorder we noticed that all the fields using "long string" was cut after 16 chars when a new purchesorder was added. After some investigation we found that in the autogenerated procedure for adding/updating a purchaseorder the input value for the fields was nvarchar(16) when in the model for an order it was an ntext. When looking through the database for how the metafields are setup we found that the table "MetaDataType" does contain the correct value for nvarchar(max),
But when looking in the "MetaField" table all the old fields that uses long string have a different length value of 16, so when the procedure is regenerated the data is cut.
Is this something that is fixed in later versions, or did I miss a release note telling me to fix it manually?, Can I fix it manually by uppdating 16 -> -1. I assume that newly created long string get -1 because there are some with that value in the table.