1

is it possible creating a Visualforce page (containing APEX code) and add it to a Page Layout using the REST API? I couldn't find any information about that.

1

You cannot manipulate your org's metadata from the regular REST API. To make changes to the org's configuration or metadata, you must use either the Tooling API or the Metadata API, which would allow you to construct and deploy those entities.

Note that you cannot deploy Apex code to a production Salesforce org without addressing unit tests. You should include those tests in your deployment and run them.

There is some access to the Metadata API available from Apex, but not enough to do what you are aiming at. You could do it within Apex via the apex-mdapi wrapper library.

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.