function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Unable to download .tgr and .cls files

i am unable to download .tgr and .cls files from my sandbox instance. the trigger is working fine in the sandbox and the unit test is running fine with code coverge over 80%.

Can anyone tell me why is it behaving so.

Thanks for a any assistance in advance.
How are you trying to download them?
directly from the class detail page in the sandbox. it is directing me to  a blank page.
I am experiencing same problem with one of my clases which contains non ASCII characters. File is UTF-8 format. This problem is only with one particular class and no problems with other triggers and classes).

By the way, Eclise plugin does not like this class either (after save all non ASCII characters get converted to question marks '?') so I have to use ANT tool for deploy.
it does not download the file if its size is more than 1000 characters. it has nothing to do with test coverage and stuff.
you can copy paste the file in a notepad and save it as ".tgr" or ".cls" file and use it in your ant tool for deploying.
Hi Yagna,
I am trying to deploy my triggers from sandbox to the production environment. These are working fine in sandbox without any errors.
But when i try to deploy them in production, i start getting Code Coverage, Test Coverage errors and it is not deployed.
Can you please let me know what is the problem. I dont seem to understand this.
Kindly Guide....
Thanks and Regards,

You might have read in the release notes you have to have 75% code coverage and all. All your test cases have to pass for your triggers to be upload successfully.

little care has to taken while preparing sample data for test cases, below two links may help you.