cancel
Showing results for 
Search instead for 
Did you mean: 

Creating worksets via API

Former Member
0 Kudos

Hi all!

Is it possible to create and change worksets dynamically via API? I have found documentation how to read pcd objects and their properties but not how to edit pcd objects:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6112ecb7-0a01-0010-ef90-941...

best regards

Michael

Accepted Solutions (0)

Answers (1)

Answers (1)

Dan_Wroblewski
Developer Advocate
Developer Advocate
0 Kudos

Hi Michael,

(1) To change workset attributes, get the IPcdContext object for the workset, then do something like this:

ModificationItem[] mods = new ModificationItem[1];

mods[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE,new BasicAttribute("com.sap.portal.navigation.MergePriority", new Double("75")));

myPcdContext.modifyAttributes("",mods);

(2) To create, you could simply bind a new context to the folder you want to place the workset, and set all the attributes (most important, object class and name). This is a little tricky, and there may be side effects I haven;t thought of.

For iView, you would use the IiViews semantic object to create the iView, and this object would take care of almost everything for you. But there is no workset object.

Hope this helps.

Daniel