4

ZenDesk is a third party customer support tool that integrates with Salesforce.Because they had a bug with their customizations, I wrote a scheduled class that went into their custom records after they were created, and updated some information in them. I didn't make the class part of their package or anything like that AFAIK.

Recently I noticed a date-sensitive test had failed in its test class, so I downloaded the class and its test class from my production into the IDE so I could update the test and redeploy.

Here's the strange thing: when I check the xml file of those classes, they both have tags similar to managed package classes! None of my other classes have this "packageversions" tag

enter image description here

While all the ZenDesk file names start with ZenDesk, mine starts with "Scheduled", so I'm not sure if my filename is the cause. And when I look at the class within SF.com, it clearly doesn't have a namespace:

enter image description here

Can anyone explain what's going on here?

4

Once any of your components reference anything from the managed package then the packageVersions tab will be populated. Its used to indicate that your class is now dependent on that package being installed.

<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>26.0</apiVersion>
    <packageVersions>
        <majorNumber>6</majorNumber>
        <minorNumber>23</minorNumber>
        <namespace>abc</namespace>
    </packageVersions>
    <status>Active</status>
</ApexClass> 

In your case its because your scheduled class is referencing an object from the ZenDesk package.

  • 2
    It's important to note that this can cause intended headaches if a changeset is built in a source organization with one version installed and a destination organization with a different version installed. – sfdcfox Dec 13 '13 at 17:17
  • Thanks guys! Followup question: When I attempt to deploy just the related test class (with a fix to improve code coverage) from the IDE, I get a validation error saying "Cannot deploy InstalledPackage in Package Manifest with any other types!". Though I'm only deploying that one, my Force project in the IDE does include other classes and triggers - is that the cause of the problem? – smohyee Dec 13 '13 at 18:40
  • 1
    Have a look at salesforce.stackexchange.com/questions/14020/… to see if that is any help – BarCotter Dec 13 '13 at 19:05
  • I had read about the issues with version 28 before, but I don't think that's it, since I've pushed other non-packaged classes successfully with my version =/ – smohyee Dec 13 '13 at 20:09
  • 1
    EDIT: I take it back... using the 'save to server' option instead of 'deploy to server' within the IDE worked, so I guess it's an IDE issue still. Thanks all! – smohyee Dec 13 '13 at 20:17

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.