I am testing out updating a trigger status [from active to inactive] via the Metadata Api. I have manually set up the new zip file to so that I can update this data. When I use deploy()/checkDeployStatus(), The data says everything 'succeeded' but not changes are ever made. Has any one ever ran into this issue or could assist? Here is some data about my calls:

My zip file is in the following format:

    - package.xml
    - triggers
        - AccountTestTrigger.trigger
        - AccountTestTrigger.trigger-meta.xml [here active is set to inactive]

CheckDeploy Results:

RESULTS: (DeployResult){ checkOnly = False
   details = 
         runTestResult = 
           numFailures = 0
           numTestsRun = 0
           totalTime = 0.0
   done = True
   id = "0Af3700000BmLUqCAN"
   ignoreWarnings = False
   lastModifiedDate = 2015-08-04 06:28:53
   numberComponentErrors = 0
  numberComponentsDeployed = 0
  numberComponentsTotal = 0
  numberTestErrors = 0
  numberTestsCompleted = 0
  numberTestsTotal = 0
  rollbackOnError = False
  runTestsEnabled = False
  startDate = 2015-08-04 06:28:53
   status = "Succeeded"
   success = True }
  • What did it say in the UI? Was it all green circles saying that one component was successfully deployed? – martin Aug 4 '15 at 15:56
  • The UI said said success and 0 components deployed. I guess it's not picking up the data? – tauren.kristich Aug 4 '15 at 15:57
  • From the docs, the Metadata API seems to be the only way to do this? – tauren.kristich Aug 4 '15 at 16:43

Your test.zip is missing root folder.

zip structure should be something like this:

- unpackaged\
---- triggers\
------- AccountTestTrigger.trigger
------- AccountTestTrigger.trigger-meta.xml
---- package.xml

unpackaged above is used on the assumption that you are not deploying named packages (which is usually the case).

FYI - you may want to try workbench to test/try your deployments.
In workbench use menu Migration -> Deploy
There you can provide your zip file and see if it deploys correctly.
This should give you an idea if the problem is in your code (assuming you are writing some code to deploy your stuff) or somewhere else (e.g. zip structure).

Also it is worth paying attention to the deployment results.
A "success" result like this:

numberComponentsDeployed = 0

normally means that package/zip structure is not quite right.

  • I changed the zip file to the above structure and tested it out in the workbench. I received this error, which is odd because my package.xml is included.: fileName: __MACOSX/package.xml fullName: package.xml problem: No package.xml found – tauren.kristich Aug 4 '15 at 16:35
  • package.xml should be under unpackaged folder. So, root folder is unpackaged and the triggers folder is a child. package.xml file is a sibling to triggers folder. – Sridhar Aug 5 '15 at 5:58
  • No package.xml file found typically means either the folder structure is wrong or that you are doing this for a managed package which is not allowed. – Sridhar Aug 5 '15 at 5:59
  • 1
    Hi @tauren.kristich - looking at __MACOSX/package.xml part I think your zip includes more than necessary. You may need to remove __MACOSX folder from ZIP. See: stackoverflow.com/questions/10924236/…. Also, you may want to try to do "Migration" -> "Retrieve" with workbench - this will give you good a idea about the correct ZIP structure. – gaiser Aug 5 '15 at 8:37

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.