I am creating an App in which there is tab in the App with a Visualforce Page. But it will show a nothing on start(Empty Page with just apex:page markup) and after setting up a some configurations of the App the Visualforce Page content needs to be updated. But when I try to install the package as the App in Dev it throws the Error "Could not save TestPage, : managed installed classes cannot be saved". However it is getting updated in the Packaging Org. I am using Tooling API to update the Visualforce Page.

This is the Response from the containerAsyncRequest:-

{
  "attributes": {
  "type": "ContainerAsyncRequest",
  "url": "/services/data/v38.0/tooling/sobjects/ContainerAsyncRequest/1dr0Y00000168j7QAA"
  },
  "Id": "1dr0Y00000168j7QAA",
  "IsDeleted": false,
  "CreatedDate": "2017-02-18T15:01:08.000+0000",
  "CreatedById": "0050Y000000SpFtQAK",
  "LastModifiedDate": "2017-02-18T15:01:08.000+0000",
  "LastModifiedById": "0050Y000000SpFtQAK",
  "SystemModstamp": "2017-02-18T15:01:08.000+0000",
  "MetadataContainerId": "1dc0Y0000001SoBQAU",
  "MetadataContainerMemberId": null,
  "ErrorMsg": "Could not save TestPage, : managed installed classes cannot be saved",
  "IsRunTests": false,
  "State": "Failed",
  "IsCheckOnly": false,
  "DeployDetails": {
    "allComponentMessages": [],
    "componentFailures": [],
    "componentSuccesses": [],
    "runTestResult": null
  }
}
up vote 2 down vote accepted

It looks like you are trying to use the tooling api to dynamically update a managed package component in the subscribers org. That isn't possible. As you found, components of a manged package can only be updated in the packaging org.

It's the same general idea as the subscriber org not being able to update the components.

  • In fact, it essentially is the subscriber org updating components. – Adrian Larson Feb 19 '17 at 0:13
  • I guess you are right and i have made changes in the Page. Instead of making changes to the Visualforce Page dynamically i am using rendered attribute and not showing the Main Page until the Setup is done. Thank you for your answer. – AKSHAY Dhiman Feb 21 '17 at 8:47

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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