Contents tagged with Varbinary
sometime it is needed to insert some binary information in one or another table inside of Acumatica. Quite often developers just modify existing record in table UploadFile or UploadFileRevision.
But I don't like such approach, as it is prone to errors and potentially can harm some of your existing data. That's why I propose to use cast operator of MS SQL. Take a look at following example:
insert into UploadFileRevision(CompanyID, FileID, FileRevisionID, Data, Size, CreatedByID, CreatedDateTime, CompanyMask) values
(2, '35b15ad7-b5c3-4a19-aa77-3a24c046d689', 1,
CAST('wahid' AS VARBINARY(MAX)),
'B5344897-037E-4D58-B5C3 … more