10

I keep getting this error when trying to save a trigger, "Invalid API version: 0.0"

I've googled this error and I haven't been able to find anything about how to resolve this, does anyone have any ideas? I've seen errors when the trigger references to another API version for example, version 34 when the previous version was 35, but the trigger in question seems to have no API version slot in the dev console(others that i've created do). Furthermore, when trying to edit the trigger through the standard Salesforce UI, I get a timeout error.

Anybody have any ideas on why this could be happening? Its been happening for the past few days.

  • 2
    I haven't attempted to do any modifications with the IDE yet, I've just been using the dev console. I agree, i can definitely go in and modify the trigger with the IDE, however I'm still confused about how this could have happened with just the dev console? – Christian Jul 19 '16 at 17:33
  • The dev console is an IDE. I suspected you were using it but you were not explicit. Did you create the trigger through the console as well? – Adrian Larson Jul 19 '16 at 17:38
  • It is another companies trigger, so I am not certain. I have, however, been able to make modifications to this trigger in the past without any complications – Christian Jul 19 '16 at 17:40
  • Did you by chance manually create the metadata file somehow with the idea originally? I wonder if it's a case-sensitive thing that is respected with the dev console and not from some other IDE. – Ray Dehler Jul 20 '16 at 0:11
5

Its really weird to say but this actually looked like it solved itself after I opened up a case with Salesforce. They closed to case and told me I needed developer support, but it looks like the API version 0.0 has now disappeared and I am now able to edit in both the dev console and standard UI

I'm pretty sure this was a server issue

  • 1
    I had the same problem. Closing the dev console and reopening it resolved the problem. – Chad Dienhart Aug 16 '16 at 14:24
  • +1 Chad, closing the dev console and the specific tab resolved issue for me to. I noticed this happens when I fat finger search, causing a refresh of the page (ctrl > R) instead of searching (ctrl > F). – sfdcwill Nov 18 '16 at 19:24
  • To resolve this for me, I had to create a new workspace and then switch to it. I was then able to save my changes, which in this case were to a class. Hope that helps someone – Sara Morgan Apr 23 '17 at 14:03
1

I also encountered this error In Developer Console, but when editing a class and was able to resolve it by following the steps outlined in this other post about a similar issue Deployment Error on save from Developer Console - recurring error message with new ID

They suggest creating a new workspace and then switching to it by going to:

Workspace -> New Workspace

Switch Workspace -> Select New Workspace

1

I have the same problem and the solution was to Open Apex Classes from Setup, press on the class that making the error, from the tabs open Version Settings and then change the version to Latest or make any change (ex. set lower version, then edit the version to latest).

After this just refresh developer console and try saving. Voila

0
  1. Copy your Class code to notepad
  2. Switch to a new workspace (if you only have the default, create another one)
  3. Switch Back to the workspece you were working on
  4. Copy your notepad saved code to the class
  5. Try to save your code again

Of course i assume you are working at developer console.

0

even faster solution that i did was,

  1. select all
  2. copy
  3. close file (yes to close without saving)
  4. open file again
  5. paste and save

protected by Community Jan 14 at 15:50

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.