Setting status with SetStateDynamicEntityRequest


Use either active or inactive as value for a.state

style='font-size:10.0pt;font-family:"Courier New"'>SetStateDynamicEntityRequest
a = new SetStateDynamicEntityRequest();

style='font-size:10.0pt;font-family:"Courier New"'>a.Entity = style='color:blue'>new Moniker();

style='font-size:10.0pt;font-family:"Courier New";color:green'>//Primary key of
record

style='font-size:10.0pt;font-family:"Courier New"'>a.Entity.Id = style='color:blue'>new
Guid("{AAD5DA71-34E3-DB11-90D0-0003FF873FE6}");

style='font-size:10.0pt;font-family:"Courier New"'>a.Entity.Name =
"new_customentity";                  

style='font-size:10.0pt;font-family:"Courier New"'>a.State =
"inactive";

style='font-size:10.0pt;font-family:"Courier New"'>a.State =
"active";

style='font-size:10.0pt;font-family:"Courier New"'>a.Status = -1;

style='font-size:10.0pt;font-family:"Courier New"'>service.Execute(a);

style='font-size:10.0pt;font-family:"Courier New"'> 

style='font-size:10.0pt;font-family:"Arial","sans-serif"'> 

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.


Comments (0)