please keep in mind that any changes to properties in a JavaScript-based action / script will only be saved when you explicitly call the save() method on the ScriptNode.
In your case: <blockcode> parentFolder.properties["sop:sourceSubPerson"] = people.getPerson("Bautista"); parentFolder.save(); </blockcode>
Yes, I did call a save method just didn't include it in the code sample. I think the problem with the custom field (sop:sourceSubPerson) is that it is an association to the cmerson class. When I view the node, I see that the sop:sourceSubPerson property contains the name. However, it does not appear in the Share interface.
When I populate the field through the share interface and view the node, the Association of the node is populated with the person target reference. So am I to assume I need to be saving an association? And how would I do that?
After surfing the forums below was the solution I emulated, hope it helps others. My custom field sop:sourceSubPerson was an association to cmerson so an update to properties method did not do anything. An association must be created in the node containing the custom field and that was done by the below.
var parentFolder = document.parentAssocs["cm:contains"][0]; var person = people.getPerson('Bautista'); parentFolder.createAssociation(person, "sop:sourceSubPerson"); parentFolder.save();