Wednesday, January 27, 2021

FileNet Dojo Script in ACCE -Set List values to String List object (multi cardinality object values) - com.filenet.api.collection.StringList

 importClass(Packages.com.filenet.api.property.Properties); 

importClass(Packages.com.filenet.api.constants.RefreshMode);

importClass(Packages.com.filenet.api.collection.StringList);

function OnCustomProcess (CEObject)

{

CEObject.refresh(); 

var list =new Packages.com.filenet.api.core.Factory.StringList.createList();

var values = CEObject.getProperties().getStringValue("City").split(";");

for (var l = 0; l < values.length; l++) {

        list.add(values[l]);

}

CEObject.getProperties().putObjectValue("StatesList",list);

CEObject.save(RefreshMode.REFRESH);

}

No comments:

Post a Comment