3

I have a managed package that currently requires the Product Schedule feature due to references to the OpportunityLineItemSchedule.

This blocks attempts by orgs without the feature enabled with the message:

Missing Organization Feature: ProductSchedule

Managed Package that requires Product Schedule

If I remove all code references to OpportunityLineItemSchedule from the code and instead use dynamic SOQL will the feature dependency be removed from the managed package?

1 Answer 1

2

Yes, but you'll need to remove all static references to that type (not just SOQL, also variable declarations will need to be moved to generic SObjects, etc). Dynamic SOQL and SObject get/sets are not validated / processed until runtime.

You'll need to be more careful after doing this, since it will obviously make your code more prone to runtime errors. Also you won't be able to get code coverage on the part of your app that talks to OpportunityLineItemSchedule if you want those tests to pass in non-enabled orgs.

1
  • Thankfully my references to OpportunityLineItemSchedule are limited to one class and the associated tests, so it shouldn't be to difficult to rework. More generally, it makes me wonder what the options for reworking a trigger would be? I guess the trigger would need to be defined outside the managed package and then call into a global method. Feb 27, 2013 at 22:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .