I am using "ToolingAPI" to create a trigger dynamically , but I received this error:

> 
> "INVALID\_ARGUMENT\_TYPE : Missing field [TableEnumOrId] on trigger create"
> 
> 
> 

I am using this code:

```
ToolingAPI toolingAPI = new ToolingAPI();
toolingAPI.ApexTrigger newTrigger = new ToolingAPI.ApexTrigger();
newTrigger.Name = 'HelloWorld77';
newTrigger.Body = 'trigger HelloWorld77 on Account (before insert) {}';

```

and when I added this line :

```
newTrigger.tableEnumOrId = 'Account';

```

I received an another error:

> 
> System.StringException: Invalid id: Account
> 
> 
> 

The tooling api wrapper used here is provided on [Github](https://github.com/afawcett/apex-umlcanvas/blob/master/src/classes/ToolingAPI.cls).