Skip to Content

Custom Personalization Data Cleanup tool Not working

Hello All,

We have prepared a custom "Personalization Data Cleanup" tool, that takes object path as input and clears all its personalization.

We have noticed that all lines get executed without any errors in logs, but still, this object is seen in list of personalization objects inside "System Admin > Support > PCD Tools > Personalization Data Cleanup" .

1. Does it mean that our custom code is NOT able to clear personalization for this object?

2. How we clear personalization for an object such that it disappears from this list?

Code snippet we used is:

  String objectName = "portal_content/mycompany/fwk/dsk/fwk.desktop";

IUser user = com.sap.security.api.UMFactory.getUserFactory().getUserByLogonID(upn);  

env.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, com.sapportals.portal.pcd.gl.IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
env.put(com.sap.portal.directory.Constants.REQUESTED_ASPECT, com.sapportals.portal.pcd.gl.IPcdAttribute.PERSISTENCY_ASPECT);
env.put(javax.naming.Context.SECURITY_PRINCIPAL, user);
env.put(com.sapportals.portal.pcd.gl.IPcdContext.PCD_PERSONALIZATION_PRINCIPAL, user);

iCtx = new javax.naming.InitialContext(env);

myObject = (com.sapportals.portal.pcd.gl.IPcdContext) iCtx.lookup(objectName);      

myObject.removeModifications("");
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers