I installed an App Exchange product (https://appexchange.salesforce.com/appxListingDetail?listingId=a0N30000004cSsOEAU) and it allows one to set additional roles as part of custom settings.

While it can easily be done in the UI by going to Custom Settings for Chatter Delete, I wanted a programmatic way of doing it.

Looking at it, I can see that one can easily write some Apex code that does an upsert into the Chatter_Delete_Settings__c with the Profile Id. However where would I put this code as I am not familiar with seeding activities in Salesforce.

I mean it can be run as a post deployment step, but is there a better way?



An InstallHandler can do it, but that only applies to the original package developer. As a subscriber, the best you can do is a post-deployment step. Salesforce DX can help automate this (e.g. force:package1:install + force:data:bulk:upsert), but ultimately, you'd still need to do something to make this happen.

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.