Skip to main content
Dwight Altman ha fatto una domanda in #Apex
Dear Developer Community,

I was going through the Apex Quick Start exercise to deploy https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_qs_deploy.htm and noticed that the Validation Failed regarding objects that should have no relation to the Apex Quick Start exercise.

Another Admin had previously installed a package from AppExchange (CreateAssetOnClosedWon) on the Sandbox, and then installed the same package in our Production Org (not using the Deployment method).  Before attempting the exercise, the Sandbox was refreshed.  During the exercise, the Deployment Settings were changed to authorize Develop to Production deployment.

The Apex Quick Start exercise has us select specific components to Add Dependencies to the Change Set.

1) Why would anything from the CreateAssetOnClosedWon package prevent my deployment of my custom object from the Apex Quick Start exercise?

2) Why are there packages in the AppExchange which apparently do not pass Validation?

3) How do I fix our Org so that future Sandbox Deployments will Validate?

4) Can I attach a PDF attachment to show the error I get?  How?

Thanks.
7 risposte
  1. 4 giu 2015, 18:13
    I did write a custom validation rule "ShipToCheck" which tests the field Account.ShippingAddress which is Visible and Editable to all Profiles.

    Should I start a new topic?  Assuming I needed to assert the state of Account.ShippingAddress, I attempted to select it in the test class.  Field Name ShippingAddress is an Account Standard Field, yet changing the Apex test class from 

    Account a = [select Id from Account limit 1];

    to

    Account a = [select Id, ShippingAddress from Account limit 1];

    gives

    Error: Compile Error: No such column 'ShippingAddress' on entity 'Account'.

    similar to the Component Errors and Apex Test Failures.

    Does Apex need authorization to access the field?  How?
0/9000