Can someone suggest how I can use "deleteObjectAttributeBean()" in groovy scripting in order to update/delete an insight object attribute value to null?
Hi Janos.
As you rightfully suggested in your support Request with us, I am posting the answer here for the benefit of the community :)
In order to clear an Attribute Value, you have to delete the ObjectAttributeValueBean.
Here is an excerpt of a script doing just that:
// Update End Date obTriage = objectFacade.loadObjectAttributeBean(insightObject.getId(), "End Date").createMutable()
value = obTriage.getObjectAttributeValueBeans()
value.clear() try {
obTriage = objectFacade.deleteObjectAttributeBean(obTriage.id);
} catch (Exception vie)
{ log.error("Could not update object attribute due to validation exception:" + vie.getMessage()); }
}
Kind regards,
Yinon
Team Riada
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.