Instantly share code, notes, and snippets.

What would you like to do?
Update a person object in Alfresco using CMIS 1.1 and cmis:item support
rs = session.query("select cmis:objectId FROM cm:person where cm:firstName like 'Te%' and cm:organization like 'Green%' and cm:location like 'Dallas%' and (cm:companypostcode <> '75070' or cm:companypostcode is null)", false)
if (rs.getTotalNumItems() == 0) {
println("Couldn't find person that matched query")
for (res in rs) {
personId = res.getPropertyValueById("cmis:objectId")
person = session.getObject(personId)
println("Updating " + person.getPropertyValue("cm:userName"))
postalCode = person.getPropertyValue("cm:companypostcode")
props = new HashMap<String, Object>()
props["cm:companypostcode"] = "75070"
person.updateProperties(props, false)

This comment has been minimized.

vurquia commented Sep 15, 2014

Good morning @jpotts,
I using alfresco comunity 4.2.f. How can I enable cmis:item support on it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment