function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shane RossShane Ross 

Pardot Managed Package test failing due to missing standard field when deploying with Ant.

Hi,
We have Pardot integrated with our Salesforce instance and just yesterday our automated builds to the CI sandbox started failing with the error:

Test Failures: [sf:deploy] 1. pi.EmailSearchEndpointTest.test_SalespackUserWithMultipleEmail -- System.QueryException: No such column 'LastReferencedDate' on entity 'Lead'. 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. [sf:deploy] Stack trace: (System Code)

When I do a query in the Dev console I can find this column just fine... In Production, the CI sandbox and the development sandbox.
Documentation (https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_lead.htm#topic-title) from SF indicates it does indeed exist and did in the last version of the api as well.
I've refreshed the CI sandbox, tried building from the local copy of the dev sandbox using ant on my local machine, removed the lead object from source code control and a bunch of other ineffectual attempts to get it to deploy.

Source code control doesn't show any changes made to this object in the last couple of weeks.

Anyone got any hints?
Shane RossShane Ross
I've got around this temporarily by updating the Ant-Salesforce.jar and specifying testLevel="RunLocalTests".

The test passes in the sandbox using run all tests but not when using ANT. It would seem there is a bug when deploying using the Metadata API over the Tooling API...