RForcecom icon indicating copy to clipboard operation
RForcecom copied to clipboard

Feature Request

Open Btibert3 opened this issue 9 years ago • 5 comments

Any chance that you might add some functionality to work with the metadata API?

Btibert3 avatar Aug 27 '15 18:08 Btibert3

Is the creating/deleting objects and fields even possible? It would be great to be able to programmatically, with R, build out orgs quickly to demonstrate proofs of concept.

Btibert3 avatar Oct 17 '15 13:10 Btibert3

@Btibert3 Yes, you should be able to create/delete objects and fields since the Metadata API supports CRUD operations. I'll be taking a look at the Metadata API soon.

StevenMMortimer avatar Oct 18 '15 15:10 StevenMMortimer

Awesome. I am currently trying to work through the code, but admittedly I am still trying to figure out how it might work through R. That said, if you do get something hacked together, I am pretty sure that I could run with an example and would absolutely love to help out on that side of the equation.

Btibert3 avatar Oct 19 '15 22:10 Btibert3

Below is a link to a gist that demos reading the metadata from the Account object, then switching the name on it to "Custom_Account__c", and re-submitting that same metadata back into Salesforce to create a custom copy of the Account object. The code is still really rough and we'll need to write some convenience wrappers to abstract a lot of the action, but figured it'd help get the ball rolling.

https://gist.github.com/ReportMort/f84f6d853ea3c886ebe4

StevenMMortimer avatar Oct 20 '15 04:10 StevenMMortimer

That is fantastic. Let me try to wrap my head around it and see what I can do. Thanks for kicking this off!

Btibert3 avatar Oct 20 '15 12:10 Btibert3