I have installed manage package on my client's org and we are storing service charge's in the custom-setting and it's part of managed package. whatever the fields created initially in this setting are getting accessed in the packaged apex code. but if client create's a new service charge on his own org independently (Obviously it will not be part of manage package) it's not getting accessed in packaged apex code. is there any workaround for this?

Thanks any help will be appreciated.

  • What is the type of the custom setting you are trying to access? Is it List or Hierarchy? – Ranga May 21 '18 at 10:52
  • Service Charge is a record or custom setting? – Tushar Sharma May 21 '18 at 10:59
  • You want to create records or want to alter metadata? – Pranay Jaiswal May 21 '18 at 11:04
  • It depends on whether or not the custom setting is protected. If it's not, you should be able to edit it with your own values. – crmprogdev May 21 '18 at 12:54

The simplest solution is to make your own custom setting public and ask customers to add their records to your setting. (They can add their own custom fields to your custom setting object if they want to.)

If you want to access a separate custom setting created by the customer you can (via a query only). But you will have to add some configuration options to inform your managed package of the object name and field names and then build a dynamic SOQL string to do the query.

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.