I'm struggling to deploy Apex trigger using Metadata API from my connected app. I have created package.xml and the two trigger files - one with suffix .trigger and another - triggerName-meta.xml. I was able to convert the ZIP to byte array and pass it to metedata api deploy() method. I have followed the sample java code in the docs and adjust it to C#. The deployResult success is true, but no trigger is available in SF.
Here is my zip structure:
In the docs says that the trigger files should be in folder
triggers, but if i create such structure:
package.xml triggers\ TrigerName.trigger TrigerName.trigger-meta.xml
The deployResult says that no package.xml file was found.
And here is the deployResult from my code:
I would appreciate any help! Thanks!
EDIT: The Solution for my case
Thanks to gaiser i have resolved my issue. Here's the correct folder structure of the ZIP file:
unpackaged\ package.xml triggers\ TrigerName.trigger TrigerName.trigger-meta.xml