2

I am currently running into an issue with my post intstall script batch job. When trying to copy the values from the old field on account to the new field, for one reason or another I get the following exception:

"First error: No such column 'RRR__Pricebook2__c' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names."

The field referenced in the error (RRR__Pricebook2__c) is a new field just added in this version of the software and should exist in the post installation context but for some reason it cannot find it. I also did make sure to query the field on the accounts I am updating like (though the error doesn't seem to be due to not querying anyways)

Has anyone else run into this problem or have a solution?

Thanks in advance to the replies.

2
  • Is the error happening when your customer is upgrading the package or when you are compiling the package ? Commented Sep 22, 2016 at 1:32
  • It is happening when the install/upgrade is occurring. The package compiles fine and the same logic inside my upgrade job works outside of the context of the post install job. When I run the code from the developer console it works as intended. For some reason it just wont work in the post install batch job. Commented Sep 22, 2016 at 18:39

1 Answer 1

0

Found the answer. Issue was due to the fact my class had declared 'with sharing'

You must log in to answer this question.

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