Use either active or inactive as value for a.state
a = new SetStateDynamicEntityRequest();
a.Entity = new Moniker();
//Primary key of
a.Entity.Id = new
a.Status = -1;
NOTE! there is a bug in assoicated views on custom entities making inactive records to be displayed in grid. This has been fixed as seperate hotfix and are included in update rollup packet 1 and timezone fix.