7

Why, when trying to modify a Visualforce Page in Dev Console on a Production org, do I get the following error:

Can't alter metadata in an active org

But, when I modify the page in the Web IDE, it allows it just fine?

6

While I don't have any documentation reference, I suspect that the web interface does not use the more recent tooling api yet, while the developer console does.

I suspect the create/update call in the tooling api is limited to developer orgs and sandboxes:

Use create() to compile Apex classes or triggers in Developer Edition or sandbox organizations.

Know that it's strongly discouraged to do any direct code changes on production orgs. Besides introducing bugs this may also bring down your code coverage, making it very hard to do further changes or deploy to your org. This is what sandboxes are for.

  • Ok, thanks. I guess I could test that by toggling the use of Tooling or not in Mavensmate....would you concur? – executeanon Sep 11 '14 at 12:10
  • I don't know the implementation of the mavensmate plugin or the salesforce web interface. With tooling api disabled, mavensmate likely falls back to the metadata api, but that still doesn't mean that the internal salesforce UI goes through the metadata api or has direct access. – Samuel De Rycke Sep 11 '14 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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