could anyone suggest whether we can update API version of apex class through Apex/trigger. If i try to update ,i am getting DML operation not allowed on aepx classes.


1 Answer 1


No, Apex Code can't directly modify a class or trigger without going through the API. This means that you'd have to call either the Metadata or Tooling API, which you could access via financialforcedev/apex-mdapi, for example. It would be a lot easier to access the API from outside Apex Code, such as JavaScript or Java (via an Applet) than to try and do this directly within Apex Code.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .