3

Description - Error: Managed Package Patch Modification Exception A change was made to the patch release that will change the visible behavior of the application: Feature dependency addition: Quotes: Apex Class: xyzzzzzzzz

  • When: The above error is visible when we try to query out the Quotes and its document. As soon as the query is commented out the packaging does not have any issues.
  • Where: below is the code that is commented out to remove the error. This code is related to the feature. Is there a workaround?

Code:

List<Quote> quotes = [Select q.Id from 
Quote q where q.OpportunityId=:RelatedQuoteDocuments]; 
for(Quote quote : quotes) 
{ 
    QuoteDocument quoteDocument = [Select d.Id, d.Name from QuoteDocument d where d.QuoteId=:quote.Id ORDER BY d.Id DESC LIMIT 1];
    if(quoteDocument != null) 
    { 
        dsCreateAndSend.AddDocument(quoteDocument.Id, 'Quote', quoteDocument.Name, docOrder); 
        docOrder++; 
    } 
}

1 Answer 1

6

According to Create and Upload Patches in First-Generation Managed Packages no new feature dependencies can be added when creating a patch:

Development in a patch development org is restricted.

  • ...

  • You can’t add feature or component dependencies.
    You can remove a feature or component dependency from a patch, but after the dependency is removed and the patch version is uploaded, you can't reinstate that dependency in a new patch version. To reinstate the dependency, create a new major or minor package version.

Is this the first time Quotes have been referenced in the package? If so that would make sense why the new feature dependency and hence you may need to look into developing as a new package version rather than a patch?

2
  • Thanks for the reply, 4.1.1 did not have these queries for quotes but they were added in the 4.1.2 patch. Its a new dependency as it tries to touch a new non default salesforce object Quotes but no new components were added. I will be checking to see if this code change is supported in the next version of 4.2 instead of 4.1.2.
    – user2890
    Commented May 30, 2013 at 16:35
  • A work around for this was to create a sObject List<Quote> quotes = [Select q.Id from Quote q where q.OpportunityId=:RelatedQuoteDocuments]; 671 for(Quote quote : quotes) List<sObject> quotes = Database.query('Select q.Id from Quote q where q.OpportunityId=:RelatedQuoteDocuments');
    – user2890
    Commented Jun 3, 2013 at 19:39

You must log in to answer this question.

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