4

In my SalesForce managed package I have a Batch Apex job that queries OpportunityHistory and does some post-processing (basically serialize them and posts to external Web Service)

When I schedule and execute this batch in my development organization everything works fine, however after packaging and installing on test org I get following error - Invalid field StageName for OpportunityHistory

It's interesting however that the similar code works completely fine for Opportunity object both in developer console in dev org and in installed package on test org.

In test org I do not see any logs for installed package so it's hard to predict why this happens. It's important to notice that package is installed with unrestricted access

It's obvious that StageName is a valid field for OpportunityHistory - so I cannot gues what can be the cause of this error.

Any help will be appreciated.

2
  • Fyi, as the creator of the managed package, you can get detailed logging turned on for it via a support request to Salesforce.
    – Keith C
    Mar 17, 2014 at 15:00
  • 1
    Quite strange indeed.. I assume you set up a sales process on the test org? And what is the exact piece of code causing the error? Mar 17, 2014 at 15:38

0

You must log in to answer this question.

Browse other questions tagged .