2

I have roughly 4 Active groups of 150 categories I need to create. Is there a way to create them programmatically? Other then typing them in 1 by 1 into the system?

1

You can use the metadata api to add categories to the Category Groups. I just did it yesterday using the Eclipse Force.com IDE. I created the groups, and created a couple of categories in one to use as a reference. I then created a new project and pulled down the metadata for the categories into the project. Then I used a spreadsheet and NimbleText (http://nimbletext.com/) to create the new category xml for each group, added it to the file, and then I saved the metadata back to my org, and it was done.

The metadata object you are looking for is DataCategoryGroup, there will be one object of this type for each group.

  • Just noticed the response a little late. I found that out the hard way later on that the DataCategoryGroups can not be migrated via change sets so I had to upload the data from the Eclipse Force.com IDE between sandboxes. Which led to me realizing they are just simply XML in the system and in the future just generating the XML. – Halfwarr Nov 28 '16 at 3:26
1

After reading the documentation, searching the Salesforce Community, and asking Salesforce directly. There does not appear to be anyway to do this currently other then thru the GUI.

Edit: There is a more tedious manual way of making the XML your self see the now accepted answer for more information.

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.