Hello, I was looking for a way to remove a custom property, like from a menu operation that calls a workflow to "remove" a component and the associated custom properties. I've looked in the CDK activities but looks like only get and set for custom properties are exposed.
Hi,
I believe you could use the "DeleteObject" activity from Dynamicops.Repository.
eg.
use a variable of type VirtualMachineProperty eg vmprop
Assign vmprop = mgmtCtx.VirtualMachineProperties.Where( Function(vmp) vmp.VirtualMachine.VirtualMachineName = MachineId).Where( Function(vmp) vmp.PropertyName = "yourproperty").FirstOrDefault()
DeleteObject (mgmtctx,vmprop )
SaveChanges ( mgmtctx)
Regards,
John
Hi,
I believe you could use the "DeleteObject" activity from Dynamicops.Repository.
eg.
use a variable of type VirtualMachineProperty eg vmprop
Assign vmprop = mgmtCtx.VirtualMachineProperties.Where( Function(vmp) vmp.VirtualMachine.VirtualMachineName = MachineId).Where( Function(vmp) vmp.PropertyName = "yourproperty").FirstOrDefault()
DeleteObject (mgmtctx,vmprop )
SaveChanges ( mgmtctx)
Regards,
John
Thanks John, that worked perfectly!