Symptom: A small number of customers may experience an error with their Asset tag label:
The SELECT permission was denied on the object 'asset', database 'WaspTrack', schema 'dbo'.
Resetting the label does not clear the error.
Cause: There is an error in the database query on the asset tag that affects only those customers whose tenants were created during a small window of time. Wasp cannot apply a blanket fix because it would overwrite any edits those customers had made on their asset tag designs.
Resolution: In the web interface, navigate to Reports > All Reports > Labels > Asset Tag label, and click Design Report. Make sure Dictionary is selected at the bottom left, then expand Data Sources and WaspDB2012 [MS SQL]. Right-click vLabelerAsset_AssetTag and select Edit. The Query Text will have the following:
select * from {schema}.vLabelerAsset_AssetTag
where
((select count(*) from {schema}.asset where asset_record_status = 1 and asset_id in ({AssetId})) = 0 AND
{schema}.vLabelerAsset_AssetTag.asset_id =
(select top 1 asset_id from dbo.asset where asset_record_status = 1 and application_id = 1)
OR {schema}.vLabelerAsset_AssetTag.asset_id in ({AssetId}))
The dbo in bold needs to be changed to: {schema}
Once that is done, you can check Preview, then Save the changes.
If you would like assistance with these steps, please contact Wasp Support.