You need to sign in to do that
Don't have an account?

Trigger is not available for this organization.
Code:
var rebateTrigger = new ApexTrigger(); rebateTrigger.apiVersion = 14.0; rebateTrigger.fullName = "Contact.OnUpdateRebateContact"; rebateTrigger.content = GetResourceFile("SourceCodes.ContactRebateUpdateTrigger.txt"); metaApi.create(new[] { rebateTrigger });
That is how I try to add a trigger.
But why do I receive
INVALID_TYPE: This type of object is not available for this organization
SourceCodes.ContactRebateUpdateTrigger.txt contains trigger source code that is correct. I take its source code and cast it to byte[] to assign to content property.
Help please.
PS. I have a namespace prefix set in my organization. Maybe that's the case?
Message Edited by Doker on 11-30-2008 01:55 PM
Did you ever get this straightened out?
I'm having similar issues attempting to clear out an ORG (remove all triggers and Classes). Both of them give me this error.
Jeff
"This type of object is not available for this organization"
After all this time:
Note
You can't use a "create" call on ApexTriggers with the Metadata API, you can only use a deploy call to create them.