function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DeepuDeepu 

Creating trigger using meta data api

Hello

 

Is it possible to create trigger using meta data api?

(Creating objects and fields are possible i guesS)

if so, please share a sample code

 

Thanksin advance

yashagarwalyashagarwal

I think it is possible to create triggers using teh metadata api and a sample code would lookd something like this :

 

<?xml version="1.0" encoding="UTF-8"?>
<ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>22.0</apiVersion>
</ApexTrigger>



 I have not tried this myself , but you can find more information here :

 

http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_triggers.htm

 

Hope this helps.