cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the shortID of a KM document?

Former Member
0 Kudos

Hi,

I need some help to get the shortID of an document. I have the whole / complete URL. Is it possible to get the shortID and something like created by form this document?

http://portal:<Port>/irj/go/km/docs/documents/Ordner1/Ordern2/Ordner3/document.pdf ... --> http://portal:<Port>/irj/go/km/docs/guid/10fc3a72-e62f-2b10-2b95-9ab60117ac65

kind regards

Micha

Accepted Solutions (0)

Answers (1)

Answers (1)

SandipAgarwalla
Active Contributor
0 Kudos

Mike

Do you mean get the shortID using custom Code?

Do a search in SDN, there are lot of helps available on how to get the short ID. SCN Portal Mentor @Detlev Beutner has written quite a stuff on KM Custom Development..

Check this - http://scn.sap.com/community/netweaver-portal/blog/2007/11/26/50-ways-to-copy-the-km-guid-short-id-i...

Sandip

Former Member
0 Kudos

Hi,

yes I mean using custom Code... I'm new in developing Webdynpro / java... For now I have the RID - Object with an valid document.. now I want the Guid from this document...

The SDN - Search doesn't help me right now... 😞

Former Member
0 Kudos

Sry SDN search helps a lot...

I have found this

 

IUriMapperService mapperService = (IUriMapperService) ResourceFactory.getInstance().getServiceFactory().getService(IUriMapperService.SERVICE_ID);

string  guidOfDocument = mapperService.getCreateConstantID(rid);

But I have a Problem: IUriMapperService can not be resolved. Organize Imports doesn't help. What kind of ja I have to reference?

Former Member
0 Kudos

 

import

com.sapportals.wcm.service.urimapper.IUriMapperService;

sry ....