1

I am deploying a new apex class from Sandbox (SB1) to SB2. I have 1 profile, ABC Service profile. I get this error after Validating in Target sandbox SB2.

In field: apexClass - no ApexClass named OrderTrackingList found in SB2

Shall I create the class in SB2 and then try deploying or how should I proceed?

Thanks!

1
  • 1
    Does the new class have reference of OrderTrackingList class in it?
    – Rao
    Sep 23 '14 at 17:31
3

In sandbox SB1, First go to Setup > Develop | Apex classes. There click on compile all classes. Check it all classes must be compiled.

As the error says ** OrderTrackingList** doesn't exist in Sandbox SB2. So you have two ways to deploy profile

1) Remove access to ** OrderTrackingList** for ABC Profile in SB1 and try deploy. Also remove all access to classes which don't exist on sandbox SB2. After that you can give access to that class.

2) Send ** OrderTrackingList** and all its dependencies with ABC Profile

you have to send all dependent components which don't exist on other environment.

4
  • thnx for the quick response. If I don't write test class can I deploy to another sandbox? Or test class is a must?
    – MnZ
    Sep 23 '14 at 18:56
  • @MnZ you have to write test class if it isn't exist on SB1
    – Ashwani
    Sep 23 '14 at 18:58
  • i want to move the apex class from SB1 to SB2. I compiled successfully
    – MnZ
    Sep 23 '14 at 18:58
  • I'm sorry I didn't provide the feedback. @Ashwani's solution worked, when I removed all access to that class in SB1 and then moved to SB2.
    – MnZ
    Sep 30 '16 at 4:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.