Showing posts with label IBM Case Manager. Show all posts
Showing posts with label IBM Case Manager. Show all posts

Sunday, May 2, 2021

Updating Bullk Documents properties using Event Action Handler

Document Operations - Updating Document Properties with Folder Properties using EventActionHandler 


public class UpdateDocumentProperties implements EventActionHandler

{

@Override

public void onEvent(ObjectChangeEvent event, Id arg1) throws EngineRuntimeException 

{

try{  

ObjectStore os = event.getObjectStore();  

Id id = event.get_SourceObjectId(); System.out.println(" *Your Event Action Call Started *");  

Folder folder = Factory.Folder.fetchInstance(os, id, null);  

DocumentSet docList =  folder.get_ContainedDocuments();  

Iterator docItr = docList.iterator();  

while (docItr.hasNext() )

{  

Document doc = (Document) docItr.next(); doc.getProperties().putValue("Your_SymbolicName", folder.getProperties().get("Your_SymbolicName").getInteger32Value()); doc.getProperties().putValue("Your_SymbolicName", folder.getProperties().get("Your_SymbolicName").getStringValue()); doc.getProperties().putValue("Your_SymbolicName", folder.getProperties().get("Your_SymbolicName").getDateTimeValue()); doc.save(RefreshMode.NO_REFRESH); 
}catch(Exception e){
  e.printStackTrace(); 

}
}
 }

Wednesday, January 27, 2021

IBM Case Manager script - Select User Dialog box on Filed Focus event - to select user from the list of LDAP Users (ecm.widget.dialog.SelectUserGroupDialog)

if(payload.eventName === "icm.FieldFocused"){

if(payload.id === "PRX_Name")

{

 callback = function(users){

                        this.propController.set("value", users[0].shortName);

                        }; 

                    var selectUserDialog = new ecm.widget.dialog.SelectUserGroupDialog({

                                            queryMode: "users",

                                            selectionMode :"single",

                                            callback: dojo.hitch(this,callback)

                                            });

                    selectUserDialog.show(solution.getTargetOS());    

}

}